home *** CD-ROM | disk | FTP | other *** search
/ The World's Largest Collection of Windows Software / The World's Largest Collection of Windows Software - Disc 1.iso / connect / _j2 / wvnsc926 / rcs / winvn.c < prev    next >
Text File  |  1994-09-21  |  135KB  |  4,413 lines

  1. head     1.55;
  2. branch   ;
  3. access   ;
  4. symbols  V80:1.9 V76d:1.2;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.55
  10. date     94.09.19.00.16.33;  author jcooper;  state Exp;
  11. branches ;
  12. next     1.54;
  13.  
  14. 1.54
  15. date     94.09.18.22.47.33;  author jcooper;  state Exp;
  16. branches ;
  17. next     1.53;
  18.  
  19. 1.53
  20. date     94.09.16.00.44.49;  author jcooper;  state Exp;
  21. branches ;
  22. next     1.52;
  23.  
  24. 1.52
  25. date     94.08.24.18.40.15;  author mrr;  state Exp;
  26. branches ;
  27. next     1.51;
  28.  
  29. 1.51
  30. date     94.08.24.17.59.26;  author jcooper;  state Exp;
  31. branches ;
  32. next     1.50;
  33.  
  34. 1.50
  35. date     94.08.11.02.25.59;  author dumoulin;  state Exp;
  36. branches ;
  37. next     1.49;
  38.  
  39. 1.49
  40. date     94.08.11.00.09.17;  author jcooper;  state Exp;
  41. branches ;
  42. next     1.48;
  43.  
  44. 1.48
  45. date     94.08.04.05.51.54;  author dumoulin;  state Exp;
  46. branches ;
  47. next     1.47;
  48.  
  49. 1.47
  50. date     94.08.03.00.35.20;  author dumoulin;  state Exp;
  51. branches ;
  52. next     1.46;
  53.  
  54. 1.46
  55. date     94.08.02.05.00.16;  author dumoulin;  state Exp;
  56. branches ;
  57. next     1.45;
  58.  
  59. 1.45
  60. date     94.07.25.22.41.22;  author pearse_w_r;  state Exp;
  61. branches ;
  62. next     1.44;
  63.  
  64. 1.44
  65. date     94.07.25.18.51.48;  author jcooper;  state Exp;
  66. branches ;
  67. next     1.43;
  68.  
  69. 1.43
  70. date     94.06.30.16.33.35;  author dumoulin;  state Exp;
  71. branches ;
  72. next     1.42;
  73.  
  74. 1.42
  75. date     94.06.23.23.10.40;  author dumoulin;  state Exp;
  76. branches ;
  77. next     1.41;
  78.  
  79. 1.41
  80. date     94.06.17.09.08.49;  author dumoulin;  state Exp;
  81. branches ;
  82. next     1.40;
  83.  
  84. 1.40
  85. date     94.06.11.00.46.47;  author dumoulin;  state Exp;
  86. branches ;
  87. next     1.39;
  88.  
  89. 1.39
  90. date     94.06.06.22.06.13;  author gardnerd;  state Exp;
  91. branches ;
  92. next     1.38;
  93.  
  94. 1.38
  95. date     94.05.27.01.29.29;  author rushing;  state Exp;
  96. branches ;
  97. next     1.37;
  98.  
  99. 1.37
  100. date     94.05.26.22.02.38;  author jglasser;  state Exp;
  101. branches ;
  102. next     1.36;
  103.  
  104. 1.36
  105. date     94.05.23.19.51.51;  author rushing;  state Exp;
  106. branches ;
  107. next     1.35;
  108.  
  109. 1.35
  110. date     94.05.23.18.37.00;  author jcooper;  state Exp;
  111. branches ;
  112. next     1.34;
  113.  
  114. 1.34
  115. date     94.05.02.19.51.12;  author rushing;  state Exp;
  116. branches ;
  117. next     1.33;
  118.  
  119. 1.33
  120. date     94.05.02.19.45.42;  author rushing;  state Exp;
  121. branches ;
  122. next     1.32;
  123.  
  124. 1.32
  125. date     94.05.02.19.44.04;  author rushing;  state Exp;
  126. branches ;
  127. next     1.31;
  128.  
  129. 1.31
  130. date     94.04.22.05.02.23;  author dumoulin;  state Exp;
  131. branches ;
  132. next     1.30;
  133.  
  134. 1.30
  135. date     94.04.22.04.55.02;  author dumoulin;  state Exp;
  136. branches ;
  137. next     1.29;
  138.  
  139. 1.29
  140. date     94.04.19.10.18.52;  author dumoulin;  state Exp;
  141. branches ;
  142. next     1.28;
  143.  
  144. 1.28
  145. date     94.04.18.20.49.44;  author rushing;  state Exp;
  146. branches ;
  147. next     1.27;
  148.  
  149. 1.27
  150. date     94.03.01.19.10.19;  author rushing;  state Exp;
  151. branches ;
  152. next     1.26;
  153.  
  154. 1.26
  155. date     94.02.24.21.24.47;  author jcoop;  state Exp;
  156. branches ;
  157. next     1.25;
  158.  
  159. 1.25
  160. date     94.02.16.21.58.56;  author rushing;  state Exp;
  161. branches ;
  162. next     1.24;
  163.  
  164. 1.24
  165. date     94.02.16.20.59.17;  author rushing;  state Exp;
  166. branches ;
  167. next     1.23;
  168.  
  169. 1.23
  170. date     94.02.09.01.25.15;  author cnolan;  state Exp;
  171. branches ;
  172. next     1.22;
  173.  
  174. 1.22
  175. date     94.02.09.01.10.07;  author rushing;  state Exp;
  176. branches ;
  177. next     1.21;
  178.  
  179. 1.21
  180. date     94.02.04.02.18.13;  author rushing;  state Exp;
  181. branches ;
  182. next     1.20;
  183.  
  184. 1.20
  185. date     94.01.24.19.34.38;  author jcoop;  state Exp;
  186. branches ;
  187. next     1.19;
  188.  
  189. 1.19
  190. date     94.01.24.17.39.47;  author jcoop;  state Exp;
  191. branches ;
  192. next     1.18;
  193.  
  194. 1.18
  195. date     94.01.17.21.56.15;  author jcoop;  state Exp;
  196. branches ;
  197. next     1.17;
  198.  
  199. 1.17
  200. date     94.01.12.19.25.35;  author mrr;  state Exp;
  201. branches ;
  202. next     1.16;
  203.  
  204. 1.16
  205. date     93.12.08.01.27.21;  author rushing;  state Exp;
  206. branches ;
  207. next     1.15;
  208.  
  209. 1.15
  210. date     93.08.25.18.55.19;  author mbretherton;  state Exp;
  211. branches ;
  212. next     1.14;
  213.  
  214. 1.14
  215. date     93.08.05.20.06.07;  author jcoop;  state Exp;
  216. branches ;
  217. next     1.13;
  218.  
  219. 1.13
  220. date     93.07.13.16.03.04;  author riordan;  state Exp;
  221. branches ;
  222. next     1.12;
  223.  
  224. 1.12
  225. date     93.07.06.21.09.09;  author cnolan;  state Exp;
  226. branches ;
  227. next     1.11;
  228.  
  229. 1.11
  230. date     93.06.25.20.14.09;  author dumoulin;  state Exp;
  231. branches ;
  232. next     1.10;
  233.  
  234. 1.10
  235. date     93.06.24.17.13.14;  author riordan;  state Exp;
  236. branches ;
  237. next     1.9;
  238.  
  239. 1.9
  240. date     93.06.11.00.12.13;  author rushing;  state Exp;
  241. branches ;
  242. next     1.8;
  243.  
  244. 1.8
  245. date     93.05.28.17.18.00;  author rushing;  state Exp;
  246. branches ;
  247. next     1.7;
  248.  
  249. 1.7
  250. date     93.05.24.23.27.38;  author rushing;  state Exp;
  251. branches ;
  252. next     1.6;
  253.  
  254. 1.6
  255. date     93.05.18.22.10.45;  author rushing;  state Exp;
  256. branches ;
  257. next     1.5;
  258.  
  259. 1.5
  260. date     93.05.13.19.58.35;  author rushing;  state Exp;
  261. branches ;
  262. next     1.4;
  263.  
  264. 1.4
  265. date     93.05.13.16.18.00;  author rushing;  state Exp;
  266. branches ;
  267. next     1.3;
  268.  
  269. 1.3
  270. date     93.04.29.20.25.23;  author rushing;  state Exp;
  271. branches ;
  272. next     1.2;
  273.  
  274. 1.2
  275. date     93.03.09.01.28.03;  author dumoulin;  state Exp;
  276. branches ;
  277. next     1.1;
  278.  
  279. 1.1
  280. date     93.02.16.20.53.50;  author rushing;  state Exp;
  281. branches ;
  282. next     ;
  283.  
  284.  
  285. desc
  286. @winvn version 0.76 placed into RCS
  287. @
  288.  
  289.  
  290. 1.55
  291. log
  292. @MAPI for Win32s fix
  293. @
  294. text
  295. @/*
  296.  *
  297.  * $Id: winvn.c 1.54 1994/09/18 22:47:33 jcooper Exp $
  298.  * $Log: winvn.c $
  299.  * Revision 1.54  1994/09/18  22:47:33  jcooper
  300.  * new support for window cascading
  301.  * 
  302.  * Revision 1.53  1994/09/16  00:44:49  jcooper
  303.  * massive cleanup, etc for 92.6
  304.  * 
  305.  * Revision 1.52  1994/08/24  18:40:15  mrr
  306.  * authorization enables post/mail
  307.  *
  308.  * Revision 1.51  1994/08/24  17:59:26  jcooper
  309.  * misc encoding/decoding changes
  310.  *
  311.  * Revision 1.50  1994/08/11  02:25:59  dumoulin
  312.  * enabled STRICT compile and cleaned up parameter casting
  313.  *
  314.  * Revision 1.49  1994/08/11  00:09:17  jcooper
  315.  * Enhancements to Mime and article encoding/encoding
  316.  *
  317.  * Revision 1.48  1994/08/04  05:51:54  dumoulin
  318.  * Fixed problem with long mail addresses getting truncated to 32 chars
  319.  *
  320.  * Revision 1.47  1994/08/03  00:35:20  dumoulin
  321.  * Fixed bug upon exit and startup for folks that don't have
  322.  * any printers.
  323.  *
  324.  * Revision 1.46  1994/08/02  05:00:16  dumoulin
  325.  * change HANDLE to HINSTANCE for better NT compatiblity
  326.  *
  327.  * Revision 1.45  1994/07/25  22:41:22  pearse_w_r
  328.  * ShowUnreadOnly option
  329.  *
  330.  * Revision 1.44  1994/07/25  18:51:48  jcooper
  331.  * execution of decoded files
  332.  *
  333.  * Revision 1.43  1994/06/30  16:33:35  dumoulin
  334.  * Fix a problem with freeing printing fonts with an uninitialized variable
  335.  *
  336.  * Revision 1.42  1994/06/23  23:10:40  dumoulin
  337.  * Changed code to not delete hardware device context for Printer device
  338.  *
  339.  * Revision 1.41  1994/06/17  09:08:49  dumoulin
  340.  * Attempts to fix the Unable to Initialize Document printing bug
  341.  *
  342.  * Revision 1.40  1994/06/11  00:46:47  dumoulin
  343.  * Fix defaults for GenSock.DLL and prompt if no username specified
  344.  *
  345.  * Revision 1.39  1994/06/06  22:06:13  gardnerd
  346.  * horizontal scrolling support
  347.  *
  348.  * Revision 1.38  1994/05/27  01:29:29  rushing
  349.  * unnecessary winundoc.h
  350.  *
  351.  * Revision 1.37  1994/05/26  22:02:38  jglasser
  352.  * warnings
  353.  *
  354.  * Revision 1.36  1994/05/23  19:51:51  rushing
  355.  * NNTPPort becomes NNTPService, and it's a string.
  356.  *
  357.  * Revision 1.35  1994/05/23  18:37:00  jcooper
  358.  * new attach code, session [dis]connect
  359.  *
  360.  * Revision 1.34  1994/05/02  19:51:12  rushing
  361.  * more changes from jg
  362.  *
  363.  * Revision 1.33  1994/05/02  19:45:42  rushing
  364.  * redoing JD's print font size change
  365.  *
  366.  * Revision 1.32  1994/05/02  19:44:04  rushing
  367.  * changes from jody glasser
  368.  *
  369.  * Revision 1.31  1994/04/22  05:02:23  dumoulin
  370.  * Fix font size problem
  371.  *
  372.  * Revision 1.30  1994/04/22  04:55:02  dumoulin
  373.  * Fix font conversion problem when converting older winvn.ini files
  374.  *
  375.  * Revision 1.29  1994/04/19  10:18:52  dumoulin
  376.  * Updated converter for old to new INI files
  377.  *
  378.  * Revision 1.28  1994/04/18  20:49:44  rushing
  379.  * check MailList for NULL on write of newsrc
  380.  *
  381.  * Revision 1.27  1994/03/01  19:10:19  rushing
  382.  * ThreadFullSubject option added
  383.  *
  384.  * Revision 1.26  1994/02/24  21:24:47  jcoop
  385.  * jcoop changes
  386.  *
  387.  * Revision 1.25  1994/02/16  21:58:56  rushing
  388.  * call to profilestring was a little hosed for .sig file
  389.  *
  390.  * Revision 1.24  1994/02/16  20:59:17  rushing
  391.  * Added .ini param to force use of XHDR over XOVER
  392.  *
  393.  * Revision 1.23  1994/02/09  01:25:15  cnolan
  394.  * cnolan 90.2 changes
  395.  *
  396.  * Revision 1.22  1994/02/09  01:10:07  rushing
  397.  * PREF->COMM for GenSockDLL profile string
  398.  *
  399.  * Revision 1.21  1994/02/04  02:18:13  rushing
  400.  * added GenSockDLL .ini parameter
  401.  *
  402.  * Revision 1.20  1994/01/24  19:34:38  jcoop
  403.  * per email
  404.  *
  405.  * Revision 1.19  1994/01/24  17:39:47  jcoop
  406.  * 90.2 changes
  407.  *
  408.  * Revision 1.18  1994/01/17  21:56:15  jcoop
  409.  * New font/color and INI file routines.  Sig file and en/decoding inits
  410.  *
  411.  * Revision 1.17  1994/01/12  19:25:35  mrr
  412.  * mrr mods 4
  413.  * 
  414.  * Revision 1.16  1993/12/08  01:27:21  rushing
  415.  * new version box and cr lf consistency
  416.  *
  417.  * Revision 1.15  1993/08/25  18:55:19  mbretherton
  418.  * MRB merge, mail & post logging
  419.  *
  420.  *
  421.  * Revision 1.1x  1993/07/21 MBretherton 
  422.  *                Include Posting and Mail log variables
  423.  *
  424.  * Revision 1.14  1993/08/05  20:06:07  jcoop
  425.  * save multiple articles changes by jcoop@@oakb2s01.apl.com (John S Cooper)
  426.  *
  427.  * Revision 1.13  1993/07/13  16:03:04  riordan
  428.  * MRR mods
  429.  *
  430.  * Revision 1.12  1993/07/06  21:09:09  cnolan
  431.  * win32 support
  432.  *
  433.  * Revision 1.11  1993/06/25  20:14:09  dumoulin
  434.  * Cleaned up Compiler Warnings
  435.  *
  436.  * Revision 1.10  1993/06/24  17:13:14  riordan
  437.  * Save window positions between sessions.
  438.  *
  439.  * Revision 1.9  1993/06/11  00:12:13  rushing
  440.  * second merge from Matt Bretherton sources.
  441.  *
  442.  *
  443.  * Revision 1.8  1993/05/28  17:18:00  rushing
  444.  * Added Misc... option to enable threading
  445.  *
  446.  * Revision 1.7  1993/05/24  23:27:38  rushing
  447.  * Create an Article Italics Font for Quotation lines (MRB)
  448.  *
  449.  * Revision 1.6  1993/05/18  22:10:45  rushing
  450.  * smtp support
  451.  *
  452.  * Revision 1.5  1993/05/13  19:58:35  rushing
  453.  * fancy 'from' in group window
  454.  *
  455.  * Revision 1.4  1993/05/13  16:18:00  rushing
  456.  * article fetch limit (ArticleThreshold .ini param) support.
  457.  *
  458.  * Revision 1.3  1993/04/29  20:25:23  rushing
  459.  * attempted support for WSAAsyncSelect
  460.  *
  461.  * Revision 1.2  1993/03/09  01:28:03  dumoulin
  462.  * added support for italic fonts in printing articles
  463.  *
  464.  * Revision 1.1  1993/02/16  20:53:50  rushing
  465.  * Initial revision
  466.  *
  467.  *
  468.  */
  469.  
  470. /*  WinVn.c
  471.  *
  472.  *  This program is a visual Usenet news reader for Microsoft Windows.
  473.  *  It bears a vague similarity to the Unix program "vn"; hence the
  474.  *  name WINVN.
  475.  *
  476.  *  WinVN talks NNTP (Network News Transport (?) Protocol) to a news
  477.  *  server, which must be running the NNTP program.  (The source for
  478.  *  a unix implementation of NNTP is readily and apparently freely
  479.  *  available.)
  480.  *
  481.  *  For more information, see WINVN.WRI and WVDOC.C.
  482.  *
  483.  *  Mark Riordan    September - October 1989    riordanmr@@clvax1.cl.msu.edu
  484.  *  1100 Parker  Lansing, MI  48912
  485.  *  Now being maintained by Sam Rushing, rushing@@titan.ksc.nasa.gov
  486.  */
  487.  
  488. #include <windows.h>
  489. #include <windowsx.h>
  490. #define WINMAIN
  491. #include "wvglob.h"
  492. #include "winvn.h"
  493. #pragma hdrstop
  494. #include "ctype.h"
  495. #include "defaults.h"   // default profile settings
  496. #include <stdlib.h>
  497.  
  498. char *CommStrtoID (char *, int *, int *, char *);
  499.  
  500. /*--- function WinMain -----------------------------------------------
  501.  *
  502.  *  Main program for WinVN.
  503.  *  Initialize, then execute main loop.
  504.  *
  505.  *    Entry    hInstance      is a handle to this instance of execution
  506.  *                            of this program.
  507.  *             hPrevInstance  is a handle to a previous instance
  508.  *                            of execution of this program (usually
  509.  *                            0, i.e., none.  Few people would have
  510.  *                            two copies of WinVN running simultaneously.)
  511.  *             lpCmdLine      points to the command line--currently
  512.  *                            not used.  (Not to useful for Windows programs.)
  513.  *             nCmdShow       is a flag indicating that the main window
  514.  *                            should be displayed.  (Fairly worthless.)
  515.  */
  516.  
  517. int PASCAL
  518. WinMain (hInstance, hPrevInstance, lpCmdLine, nCmdShow)
  519.      HINSTANCE hInstance;
  520.      HINSTANCE hPrevInstance;
  521.      LPSTR lpCmdLine;
  522.      int nCmdShow;
  523. {        
  524.   HWND hWnd;
  525.   int x,y,width,height;
  526.   char mybuf[MAXINTERNALLINE];
  527.  
  528.  
  529.   if (!hPrevInstance)
  530.     if (!WinVnInit (hInstance, lpCmdLine))
  531.       return (0);
  532.  
  533.   hInst = hInstance;
  534.  
  535.   /* Initialize the document that will contain the list of          */
  536.   /* newsgroups.  This will be the main window.                     */
  537.  
  538.   InitDoc (&NetDoc, (HWND) 0, (TypDoc *) NULL, DOCTYPE_NET);
  539.  
  540.   /* Create and display the main window.  At first, the window      */
  541.   /* just has an initialization message in it.                      */
  542.  
  543.   /* Compute default window position and size. */
  544.   x = 0;
  545.   y = 0;
  546.   width = (int) (xScreen * 1 / 2);
  547.   height = (int) (yScreen * 9 / 10);
  548.  
  549.   /* If the window position and size have been saved, use that
  550.    * info instead.
  551.    */
  552.   GetPrivateProfileString (szAppName, "UsenetWindowPos", "!",
  553.     mybuf,MAXINTERNALLINE,szAppProFile);
  554.   if(mybuf[0] != '!') {
  555.     sscanf(mybuf,"%d,%d,%d,%d",&x,&y,&width,&height);
  556.   }
  557.  
  558.   hWnd = CreateWindow ("WinVn",
  559.              "WinVN -- Usenet News Reader",
  560.              WS_OVERLAPPEDWINDOW | WS_VSCROLL | WS_HSCROLL,
  561.              x,   /* Initial X position */
  562.              y,   /* Initial Y position */
  563.              width,  /* Initial X width */
  564.              height,/* Initial Y height */
  565.              NULL,
  566.              NULL,
  567.              hInstance,
  568.              NULL);
  569.  
  570.   if (!hWnd)
  571.     return (0);
  572.  
  573.   SetHandleBkBrush (hWnd, hListBackgroundBrush); 
  574.   SetUserMenus (hWnd, DISABLE);  // menus disabled until connection made
  575.  
  576.   hWndConf = hWnd;
  577.   NetDoc.hDocWnd = hWnd;   /* mrr */
  578.  
  579.   /* Make sure we have a host name (JSC) */
  580.   while (NNTPHost[0] == '\0' || !strcmp (NNTPHost, DEF_NNTPHost))
  581.      if (!DialogBox (hInst, (LPCSTR) "WinVnComm", hWndConf, (DLGPROC) lpfnWinVnCommDlg))
  582.        break;
  583.  
  584.  
  585.   /* Make sure we have a valid user name (JD) */
  586.   while (UserName[0] == '\0' || !strcmp (UserName, DEF_UserName)
  587.                              || !strcmp (UserName, "Unknown"))
  588.      if (!DialogBox (hInst, (LPCSTR) "WinVnPersonal", hWndConf, (DLGPROC) lpfnWinVnPersonalInfoDlg))
  589.        break;
  590.   
  591.   MoreInit ();
  592.  
  593.   ShowWindow (hWnd, nCmdShow);
  594.  
  595.   UpdateWindow (hWnd);
  596.   SendMessage (hWnd, WM_SIZE, 0, 0L);
  597.  
  598.   /* Read the NEWSRC file and display its contents in the           */
  599.   /* main window.                                                   */
  600.  
  601.   if (!ReadNewsrc ())
  602.     {
  603.       MessageBox (hWndConf, "Cannot open the NEWSRC file.", "Fatal error", MB_OK | MB_ICONHAND);
  604.       PostQuitMessage (0);
  605.     }
  606.  
  607. #ifdef WIN32
  608.   /* no MAPI support in win32s */ 
  609.   if (GetVersion() == 1    && MailForceType == MT_MAPI) {    
  610.      MailForceType = MT_NONE;
  611.      MessageBox(hWndConf, "WinVN does not support MAPI under Win32s", "MAPI Disabled", MB_OK|MB_ICONINFORMATION);
  612.   }
  613. #endif
  614.  
  615.   Initializing = INIT_NOT_CONNECTED;
  616.  
  617.   if (ConnectAtStartup)
  618.    Connect ();
  619.  
  620.   InvalidateRect (hWnd, NULL, TRUE);
  621.   UpdateWindow (hWndConf);
  622.  
  623.   /* And now for the main loop, which appears in all Windows programs. */
  624.   hAccel = LoadAccelerators (hInstance, "WinVNAccel");
  625.  
  626.   while (MainLoopPass ());
  627.   return (MainMsg.wParam);
  628. }
  629.  
  630. /* --- FUNCTION Connect ---------------------------------------------
  631.  * Connect inits comm services and starts connection process
  632.  */
  633. void Connect ()
  634. {
  635.   if (Initializing != INIT_NOT_CONNECTED)
  636.      return;
  637.   
  638.   /* disable the connect menu item during connect attempt */
  639.   SetConnectMenuItem (hWndConf, DISABLE); // connect item has reverse attributes
  640.  
  641.   Initializing = INIT_ESTAB_CONN;
  642.   InvalidateRect (hWndConf, NULL, TRUE);
  643.   UpdateWindow (hWndConf);
  644.    
  645.   if (MRRInitComm ())   /* Set up communications */
  646.   {
  647.     Initializing = INIT_NOT_CONNECTED;
  648.     SetConnectMenuItem (hWndConf, ENABLE);   // connect item has reverse attributes
  649.     return;
  650.   }
  651.   /* Set up the timer which will wake us up every so often
  652.    * so we can check to see if new characters have arrived from
  653.    * the server.
  654.    */
  655.   idTimer = SetTimer (hWndConf, ID_TIMER , 1000, (TIMERPROC) NULL);
  656.  
  657.   if (!idTimer)
  658.   {
  659.     MessageBox (hWndConf, "Couldn't create timer!", "Fatal WinVN Error", MB_OK | MB_ICONASTERISK);
  660.     Initializing = INIT_NOT_CONNECTED;
  661.     SetConnectMenuItem (hWndConf, ENABLE);   // connect item has reverse attributes
  662.     return;
  663.   }
  664.   CommDoc = &NetDoc;
  665.  
  666.   /* MRRInitComm causes CommState to be ST_ESTABLISH_COMM.  DoCommState 
  667.    * begins processing when DoCommInput (started by the timer) sees data
  668.    * from the server.  DoCommState will set Initializing back to 
  669.    * INIT_NOT_CONNECTED if any error.
  670.    * Initializing is INIT_DONE when we're connected and happy
  671.    */
  672. }
  673.  
  674. /* --- FUNCTION WinVnInit ---------------------------------------------
  675.  *
  676.  *    Initialize the program (first stage).
  677.  *    This routine does some initialization needed before the
  678.  *    creation of the main window.
  679.  *    I put off additional initialization until after the main
  680.  *    window is created.
  681.  *
  682.  *    Entry    hInstance   is a handle to the current instance of
  683.  *                         execution.
  684.  *
  685.  *    Exit     Window classes have been registered, and a small
  686.  *             amount of other window- and comm-related initialization
  687.  *             is done.
  688.  */
  689.  
  690. BOOL
  691. WinVnInit (HINSTANCE hInstance, LPSTR lpCmdLine )
  692. {
  693.   HANDLE hMemory;
  694.   PWNDCLASS pWndClass;
  695.   HDC hDC;
  696. //  char mesbuf[60];
  697. //  char *errptr;
  698.   BOOL bSuccess;
  699.  
  700.   Initializing = INIT_READING_NEWSRC;
  701.   CommLineLWAp1 = CommLineIn + MAXCOMMLINE;
  702.   LineHeight = 30;      /* kludge so Net window doesn't get divide-by-zero */
  703.  
  704.   szAppName = "WinVN";
  705.  
  706.   // locate newsrc and winvn.ini
  707.  
  708.   if (fnLocateFiles (hInstance, lpCmdLine))
  709.    return (-1);
  710.  
  711.   ReadWinvnProfile();
  712.  
  713.   // obtain point-to-logical-units conversion constants for screen and printer
  714.   hDC = GetDC (hWndConf);
  715.   ScreenYPixels = GetDeviceCaps(hDC, LOGPIXELSY);
  716.   ReleaseDC (hWndConf, hDC);
  717.  
  718.   LimitedColor = GetDeviceCaps(hDC, RASTERCAPS) & RC_PALETTE;
  719.  
  720.   PrinterInit();
  721.  
  722.   // initialize fonts
  723.   InitListFonts();
  724.   InitArticleFonts();
  725. //  InitPrintFonts();  
  726.   InitStatusFonts();  
  727.   
  728.   /* Create pointers to the dialog box functions, needed   */
  729.   /* for routine processing of dialog boxes.               */
  730.  
  731.   lpfnWinVnCommDlg =  (DLGPROC)MakeProcInstance ((FARPROC) WinVnCommDlg, hInstance);
  732.   lpfnWinVnSaveArtDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnSaveArtDlg, hInstance);
  733.   lpfnWinVnSaveArtsDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnSaveArtsDlg, hInstance);
  734.   lpfnWinVnFindDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnFindDlg, hInstance);
  735.   lpfnWinVnGenericDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnGenericDlg, hInstance);
  736.   lpfnWinVnSubjectDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnSubjectDlg, hInstance);
  737.   lpfnWinVnAuthDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnAuthDlg, hInstance);
  738.   lpfnWinVnDoListDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnDoListDlg, hInstance);
  739.   lpfnWinVnPersonalInfoDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnPersonalInfoDlg, hInstance);
  740.   lpfnWinVnMiscDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnMiscDlg, hInstance);
  741.   lpfnWinVnAppearanceDlg = (DLGPROC)MakeProcInstance ((FARPROC)WinVnAppearanceDlg, hInstance);
  742.   lpfnEditSubClass = (DLGPROC)MakeProcInstance((FARPROC) editIntercept, hInst);
  743.   lpfnWinVnThresholdDlg = (DLGPROC)MakeProcInstance ((FARPROC)WinVnThresholdDlg, hInstance);
  744.   lpfnWinVnLogOptDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnLogOptDlg ,hInstance) ;
  745.   lpfnWinVnDecodeArtsDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnDecodeArtsDlg, hInstance);
  746.   lpfnWinVnAttachDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnAttachDlg, hInstance);
  747.   lpfnWinVnEncodeDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnEncodeDlg, hInstance);
  748.   lpfnWinVnSigFileDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnSigFileDlg, hInstance);
  749.   lpfnWinVnExitDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnExitDlg, hInstance);
  750.   lpfnWinVnMailDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnMailDlg, hInstance);
  751.   lpfnWinVnSmartFilerDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnSmartFilerDlg, hInstance);
  752.   lpfnWinVnSelectPathDlg = (DLGPROC)MakeProcInstance ((FARPROC) WinVnSelectPathDlg, hInstance);
  753.  
  754.   xScreen = GetSystemMetrics (SM_CXSCREEN);
  755.   yScreen = GetSystemMetrics (SM_CYSCREEN);
  756.   CaptionHeight = GetSystemMetrics (SM_CYCAPTION);
  757.   
  758.   CommDoc = &NetDoc;   
  759.   Authenticated = FALSE;
  760.  
  761.   hListBackgroundBrush = CreateSolidBrush (ListBackgroundColor);
  762.   hArticleBackgroundBrush = CreateSolidBrush (ArticleBackgroundColor);
  763.   hStatusBackgroundBrush = CreateSolidBrush (StatusBackgroundColor);
  764.  
  765.   hMemory = LocalAlloc (LPTR, sizeof (WNDCLASS));
  766.   pWndClass = (PWNDCLASS) LocalLock (hMemory);
  767.   pWndClass->hCursor = LoadCursor (NULL, IDC_ARROW);
  768.   pWndClass->hIcon = LoadIcon (hInstance, (LPSTR) "winvn");
  769.   pWndClass->lpszMenuName = (LPSTR) "ConfMenu";
  770.   pWndClass->lpszClassName = (LPSTR) "WinVn";
  771.   pWndClass->hbrBackground = GetStockObject (WHITE_BRUSH);
  772.   pWndClass->hInstance = hInstance;
  773.   pWndClass->style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
  774.   pWndClass->lpfnWndProc = WinVnConfWndProc;
  775.  
  776.   bSuccess = RegisterClass (pWndClass);
  777.  
  778.   if (bSuccess)
  779.     {
  780.       pWndClass->hCursor = LoadCursor (NULL, IDC_ARROW);
  781.       pWndClass->hIcon = LoadIcon (hInstance, (LPSTR) "wvgroup");
  782.       pWndClass->lpszMenuName = (LPSTR) "ViewMenu";
  783.       pWndClass->lpszClassName = (LPSTR) "WinVnView";
  784.       pWndClass->hbrBackground = GetStockObject (WHITE_BRUSH);
  785.       pWndClass->hInstance = hInstance;
  786.       pWndClass->style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
  787.       pWndClass->lpfnWndProc = WinVnViewWndProc;
  788.  
  789.       bSuccess = RegisterClass (pWndClass);
  790.     }
  791.  
  792.   if (bSuccess)
  793.     {
  794.       pWndClass->hCursor = LoadCursor (NULL, IDC_ARROW);
  795.       pWndClass->hIcon = LoadIcon (hInstance, (LPSTR) "wvart");
  796.       pWndClass->lpszMenuName = (LPSTR) "ArtMenu";
  797.       pWndClass->lpszClassName = (LPSTR) "WinVnArt";
  798.       pWndClass->hbrBackground = GetStockObject (WHITE_BRUSH);
  799.       pWndClass->hInstance = hInstance;
  800.       pWndClass->style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
  801.       pWndClass->lpfnWndProc = WinVnArtWndProc;
  802.  
  803.       bSuccess = RegisterClass (pWndClass);
  804.     }
  805.  
  806.   if (bSuccess)
  807.     {
  808.       pWndClass->hCursor = LoadCursor (NULL, IDC_ARROW);
  809.       pWndClass->hIcon = LoadIcon (hInstance, (LPSTR) "wvpost");
  810.       pWndClass->lpszMenuName = (LPSTR) "PostMenu";
  811.       pWndClass->lpszClassName = (LPSTR) "WinVnPost";
  812.       pWndClass->hbrBackground = GetStockObject (WHITE_BRUSH);
  813.       pWndClass->hInstance = hInstance;
  814.       pWndClass->style = CS_HREDRAW | CS_VREDRAW;
  815.       pWndClass->lpfnWndProc = WinVnPostWndProc;
  816.  
  817.       bSuccess = RegisterClass (pWndClass);
  818.     }
  819.  
  820.   if (bSuccess)
  821.     {
  822.       pWndClass->hCursor = LoadCursor (NULL, IDC_ARROW);
  823.       pWndClass->hIcon = LoadIcon (hInstance, (LPSTR) "wvmail");
  824.       pWndClass->lpszMenuName = (LPSTR) "MailMenu";
  825.       pWndClass->lpszClassName = (LPSTR) "WinVnMail";
  826.       pWndClass->hbrBackground = GetStockObject (WHITE_BRUSH);
  827.       pWndClass->hInstance = hInstance;
  828.       pWndClass->style = CS_HREDRAW | CS_VREDRAW;
  829.       pWndClass->lpfnWndProc = WinVnMailWndProc;
  830.  
  831.       bSuccess = RegisterClass (pWndClass);
  832.     }
  833.   if (bSuccess)
  834.     {
  835.       pWndClass->hCursor = LoadCursor (NULL, IDC_ARROW);
  836.       pWndClass->hIcon = LoadIcon (hInstance, (LPSTR) "wvcstat2");
  837.       pWndClass->lpszMenuName = (LPSTR) "StatMenu";
  838.       pWndClass->lpszClassName = (LPSTR) "WinVnCoding";
  839.       pWndClass->hbrBackground = GetStockObject (WHITE_BRUSH);
  840.       pWndClass->hInstance = hInstance;
  841.       pWndClass->style = CS_HREDRAW | CS_VREDRAW ;
  842.       pWndClass->lpfnWndProc = WinVnCodingWndProc;
  843.  
  844.       bSuccess = RegisterClass (pWndClass);
  845.     }
  846.   if (bSuccess)
  847.     {
  848.       pWndClass->hCursor = LoadCursor (NULL, IDC_ARROW);
  849.       pWndClass->hIcon = LoadIcon (hInstance, (LPSTR) "wvcstat1");
  850.       pWndClass->lpszMenuName = NULL;
  851.       pWndClass->lpszClassName = (LPSTR) "WinVnBlockCoding";
  852.       pWndClass->hbrBackground = GetStockObject (WHITE_BRUSH);
  853.       pWndClass->hInstance = hInstance;
  854.       pWndClass->style = CS_HREDRAW | CS_VREDRAW ;
  855.       pWndClass->lpfnWndProc = WinVnCodedBlockWndProc;
  856.  
  857.       bSuccess = RegisterClass (pWndClass);
  858.     }
  859.  
  860.   LocalUnlock (hMemory);
  861.   LocalFree (hMemory);
  862.   return (bSuccess);
  863. }
  864.  
  865. /* --- Function MoreInit -----------------------------------------------
  866.  *
  867.  *    Finish up initializing the program.
  868.  *    I do as much initialization here as possible.  I'd rather
  869.  *    have code run after the main window is created (in WinVNInit),
  870.  *    so I have someplace to display error messages if necessary.
  871.  *
  872.  *    I read quite a few profile strings (from WIN.INI)
  873.  *    here and act appropriately (usually means setting a global variable).
  874.  *    I try to read as many as possible of the profile strings used by this
  875.  *    program here.
  876.  */
  877. BOOL
  878. MoreInit ()
  879. {
  880.   register int j;
  881.   extern char uuTable[CODINGTABLESIZE], xxTable[CODINGTABLESIZE], base64Table[CODINGTABLESIZE];
  882. //  CheckView (hWndConf);     /* modify menu as necessary           */
  883.  
  884.   /* Initialize some document and article related globals */
  885.  
  886.   for (j = 0; j < 16; j++)      // set custom colors to white
  887.     CustomColors[j] = RGB(255, 255, 255);
  888.  
  889.   ActiveGroupDoc = (TypDoc *) NULL;
  890.   ActiveArticleDoc = (TypDoc *) NULL;
  891.   for (j = 0; j < MAXGROUPWNDS; j++)
  892.     GroupDocs[j].InUse = FALSE;
  893.   for (j = 0; j < MAXARTICLEWNDS; j++)
  894.     ArticleDocs[j].InUse = FALSE;
  895.  
  896.   savingArtIndex = -1;     // reset to non-saving state
  897.   SaveArtFileName[0] = '\0';
  898.  
  899.   CodingState = INACTIVE;
  900.   CommDecoding = FALSE;
  901.  
  902.   CreateCodingMap(uuMap, uuTable);
  903.   uuMap[' ']=0;      // decode both quote and space to 0 in UU
  904.   CodingMap[CODE_UU] = uuMap;
  905.   CreateCodingMap(xxMap, xxTable);
  906.   CodingMap[CODE_XX] = xxMap;
  907.   CreateCodingMap(base64Map, base64Table);
  908.   CodingMap[CODE_BASE64] = base64Map;
  909.   // the custom map is just a pointer.  The map is defined if/when a
  910.   // custom table is read in during decoding
  911.   CodingMap[CODE_CUSTOM] = customMap;
  912.  
  913.   AttachFileName[0]='\0';
  914.  
  915.   Signature = InitTextBlock (hWndConf);
  916.   if (SigFileName[0] != '\0')
  917.     if (ReadFileToTextBlock (hWndConf, Signature, SigFileName, ADD_PLAIN) == FAIL)
  918.     {
  919.    MessageBox (hWndConf, "Signatures disabled", "Signature File Failure", MB_OK);
  920.    EnableSig = FALSE;
  921.     }
  922.      
  923.   NumGroupWnds = NumArticleWnds = NumPostWnds = NumMailWnds = NumStatusTexts = 0;
  924.   hCodedBlockWnd = NULL;
  925.   for (j = 0; j < MAX_DECODE_THREADS; j++)
  926.     CodingStatusText[j] = NULL;
  927.  
  928.   return (TRUE);
  929. }
  930.  
  931.  
  932. /* --- InitFont Functions -----------------------------------------------
  933.  *    Initialize global fonts and metrics
  934.  * Be sure to delete any existing font objects before replacing them
  935.  * Convert points representation to logical units for sizes
  936.  * JSC 1/10/93
  937.  */
  938. void
  939. InitListFonts ()
  940. {
  941.   TEXTMETRIC tmFontInfo;
  942.   HDC hDC;
  943.  
  944.   /* Unless user specified the system font, create a font as per
  945.    * the user's specifications.
  946.    */
  947.  
  948.   if (hListFont)     
  949.    DeleteObject (hListFont);
  950.  
  951.   if (ListFontSize)
  952.   {
  953.    hListFont = CreateFont 
  954.       (-MulDiv(ListFontSize, ScreenYPixels, 72),
  955.       0, /* width */
  956.       0, /* escapement */
  957.       0, /* orientation */
  958.       strstr (ListFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  959.       (BYTE) (strstr (ListFontStyle,"Italic") ? 1 : 0),
  960.       0, /* no underline */
  961.       0, /* no strikeout */
  962.       0,
  963.       OUT_DEFAULT_PRECIS,
  964.       CLIP_DEFAULT_PRECIS,
  965.       0, /* no PROOF_QUALITY */
  966.       0,
  967.       ListFontFace);
  968.   }
  969.   else
  970.    hListFont = GetStockObject (OEM_FIXED_FONT);
  971.  
  972.   /*  Get information about the font.  LineHeight and CharWidth
  973.    *  are pretty self-explanatory and the methods of determining these
  974.    *  are standard.  TopSpace and SideSpace are the top and left margins
  975.    *  in pixels; I compute them by a method I determined empirically.
  976.    */
  977.  
  978.   hDC = GetDC (hWndConf);
  979.   SelectObject (hDC, hListFont);
  980.   GetTextMetrics (hDC, (LPTEXTMETRIC) & tmFontInfo);
  981.  
  982.   LineHeight = tmFontInfo.tmExternalLeading + tmFontInfo.tmHeight;
  983.   CharWidth = tmFontInfo.tmAveCharWidth;
  984. //TopSpace = tmFontInfo.tmExternalLeading;
  985.   TopSpace = LineHeight / 4;
  986.   StartPen = TopSpace;
  987.   SideSpace = CharWidth / 2;
  988.   ReleaseDC (hWndConf, hDC);
  989. }
  990.  
  991. void
  992. InitArticleFonts ()
  993. {
  994.   TEXTMETRIC tmFontInfo;
  995.   HDC hDC;
  996.   
  997.   if (hFontArtNormal)      
  998.   {
  999.    DeleteObject (hFontArtNormal);
  1000.    DeleteObject (hFontArtQuote);
  1001.   }
  1002.   if (ArticleFontSize && !ArticleFixedFont)
  1003.    {
  1004.       hFontArtNormal = CreateFont (
  1005.       -MulDiv(ArticleFontSize, ScreenYPixels, 72),
  1006.       0, /* width */
  1007.       0, /* escapement */
  1008.       0, /* orientation */
  1009.       strstr (ArticleFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  1010.       (BYTE) (strstr (ArticleFontStyle,"Italic") ? 1 : 0),
  1011.       0, /* no underline */
  1012.       0, /* no strikeout */
  1013.       0,
  1014.       OUT_DEFAULT_PRECIS,
  1015.       CLIP_DEFAULT_PRECIS,
  1016.       0, /* no PROOF_QUALITY */
  1017.       0,
  1018.       ArticleFontFace);
  1019.  
  1020.      hFontArtQuote = CreateFont (
  1021.       -MulDiv(ArticleFontSize, ScreenYPixels, 72),
  1022.       0, /* width */
  1023.       0, /* escapement */
  1024.       0, /* orientation */
  1025.       strstr (ArticleFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  1026.       (BYTE) (strstr (ArticleFontStyle,"Italic") ? 0 : 1),  // opposite to above italics
  1027.       0, /* no underline */
  1028.       0, /* no strikeout */
  1029.       0,
  1030.       OUT_DEFAULT_PRECIS,
  1031.       CLIP_DEFAULT_PRECIS,
  1032.       0, /* no PROOF_QUALITY */
  1033.       0,
  1034.       ArticleFontFace);
  1035.    }
  1036.    else if (ArticleFixedFont)
  1037.    {
  1038.       hFontArtNormal  = GetStockObject (ANSI_FIXED_FONT);
  1039.       hFontArtQuote = GetStockObject (ANSI_FIXED_FONT);
  1040.    }
  1041.    else
  1042.    {
  1043.       hFontArtNormal = hListFont;
  1044.       hFontArtQuote = hListFont;
  1045.    }
  1046.  
  1047.   hDC = GetDC (hWndConf);
  1048.   SelectObject (hDC, hFontArtNormal);
  1049.   GetTextMetrics (hDC, (LPTEXTMETRIC) & tmFontInfo);
  1050.   
  1051.   ArtLineHeight = tmFontInfo.tmExternalLeading + tmFontInfo.tmHeight;
  1052.   ArtCharWidth = tmFontInfo.tmAveCharWidth;
  1053.  
  1054.   SelectObject (hDC, hFontArtQuote);
  1055.   GetTextMetrics (hDC, (LPTEXTMETRIC) & tmFontInfo);
  1056.  
  1057.   ArtLineHeight = max (ArtLineHeight, tmFontInfo.tmExternalLeading + tmFontInfo.tmHeight);
  1058.   ArtCharWidth = max (ArtCharWidth, tmFontInfo.tmAveCharWidth);
  1059.  
  1060.   ArtTopSpace = ArtLineHeight / 4;
  1061.   ArtSideSpace = ArtCharWidth / 2;
  1062.  
  1063.   ReleaseDC (hWndConf, hDC);
  1064. }
  1065.  
  1066. void
  1067. InitStatusFonts ()
  1068. {
  1069.   TEXTMETRIC tmFontInfo;
  1070.   HDC hDC;
  1071.  
  1072.   /* Unless user specified the system font, create a font as per
  1073.    * the user's specifications.
  1074.    */
  1075.  
  1076.   if (hStatusFont)      
  1077.    DeleteObject (hStatusFont);
  1078.  
  1079.   if (StatusFontSize)
  1080.    {
  1081.       hStatusFont = CreateFont 
  1082.       (-MulDiv(StatusFontSize, ScreenYPixels, 72),
  1083.       0, /* width */
  1084.       0, /* escapement */
  1085.       0, /* orientation */
  1086.       strstr (StatusFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  1087.       (BYTE) (strstr (StatusFontStyle,"Italic") ? 1 : 0),
  1088.       0, /* no underline */
  1089.       0, /* no strikeout */
  1090.       0,
  1091.       OUT_DEFAULT_PRECIS,
  1092.       CLIP_DEFAULT_PRECIS,
  1093.       0, /* no PROOF_QUALITY */
  1094.       0,
  1095.       StatusFontFace);
  1096.    }
  1097.    else
  1098.       hStatusFont = GetStockObject (OEM_FIXED_FONT);
  1099.  
  1100.   /*  Get information about the font.  LineHeight and CharWidth
  1101.    *  are pretty self-explanatory and the methods of determining these
  1102.    *  are standard.  TopSpace and SideSpace are the top and left margins
  1103.    *  in pixels; I compute them by a method I determined empirically.
  1104.    */
  1105.  
  1106.   hDC = GetDC (hWndConf);
  1107.   SelectObject (hDC, hStatusFont);
  1108.   GetTextMetrics (hDC, (LPTEXTMETRIC) & tmFontInfo);
  1109.  
  1110.   StatusLineHeight = tmFontInfo.tmExternalLeading + tmFontInfo.tmHeight;
  1111.   StatusCharWidth = tmFontInfo.tmAveCharWidth;
  1112.   ReleaseDC (hWndConf, hDC);
  1113. }
  1114.  
  1115. void
  1116. InitPrintFonts ()
  1117.  { 
  1118.   HDC hDC;
  1119.   if (hFontPrint)    
  1120.    {
  1121.      DeleteObject (hFontPrint);
  1122.      DeleteObject (hFontPrintB);
  1123.      DeleteObject (hFontPrintI);
  1124.      DeleteObject (hFontPrintS);
  1125.     } 
  1126.  
  1127.   hDC = (pd.hDC) ? pd.hDC : GetPrinterDC (NULL);  
  1128.   PrinterYPixels = GetDeviceCaps(hDC, LOGPIXELSY);
  1129.   if (!pd.hDC) DeletePrinterDC (hDC);
  1130.   
  1131.   if (PrintFontSize)
  1132.    {
  1133.     hFontPrint = CreateFont (
  1134.             -MulDiv(PrintFontSize, PrinterYPixels, 72),
  1135.               0,     /* width */
  1136.          0, /* escapement */
  1137.          0, /* orientation */
  1138.          FW_MEDIUM,
  1139.          0, /* no italics */
  1140.          0, /* no underline */
  1141.          0, /* no strikeout */
  1142.          0,
  1143.          OUT_DEFAULT_PRECIS,     
  1144.          CLIP_DEFAULT_PRECIS,
  1145.          0, /* no PROOF_QUALITY */
  1146.          0,
  1147.          PrintFontFace);
  1148.  
  1149.     hFontPrintB = CreateFont (
  1150.          -MulDiv(PrintFontSize, PrinterYPixels, 72),
  1151.          0,     /* width */
  1152.          0, /* escapement */
  1153.          0, /* orientation */
  1154.          FW_BOLD,
  1155.          0, /* no italics */
  1156.          0, /* no underline */
  1157.          0, /* no strikeout */
  1158.          0,
  1159.          OUT_DEFAULT_PRECIS,
  1160.          CLIP_DEFAULT_PRECIS,
  1161.          0, /* no PROOF_QUALITY */
  1162.          0,
  1163.          PrintFontFace);
  1164.  
  1165.     hFontPrintI = CreateFont (
  1166.          -MulDiv((int)(0.9*PrintFontSize), PrinterYPixels, 72),
  1167.          0,     /* width */
  1168.          0, /* escapement */
  1169.          0, /* orientation */
  1170.          FW_LIGHT,
  1171.          1, /* italics */
  1172.          0, /* no underline */
  1173.          0, /* no strikeout */
  1174.          0,
  1175.          OUT_DEFAULT_PRECIS,
  1176.          CLIP_DEFAULT_PRECIS,
  1177.          0, /* no PROOF_QUALITY */
  1178.          0,
  1179.          PrintFontFace);
  1180.  
  1181.       hFontPrintS = CreateFont (
  1182.          -MulDiv((int)(1.5*PrintFontSize), PrinterYPixels, 72),
  1183.          0,     /* width */
  1184.          0, /* escapement */
  1185.          0, /* orientation */
  1186.          FW_EXTRABOLD,     
  1187.          0, /* no italics */
  1188.          1, /* underline */
  1189.          0, /* no strikeout */
  1190.          0,
  1191.          OUT_DEFAULT_PRECIS,
  1192.          CLIP_DEFAULT_PRECIS,
  1193.          0, /* no PROOF_QUALITY */
  1194.          0,
  1195.          PrintFontFace);
  1196.    }
  1197.   else
  1198.    {
  1199.      hFontPrint = CreateFont (   
  1200.             -MulDiv(8, PrinterYPixels, 72),
  1201.    //    40,    /* default Font Size */
  1202.          0,     /* width */
  1203.          0, /* escapement */
  1204.          0, /* orientation */
  1205.          FW_MEDIUM,
  1206.          0, /* no italics */
  1207.          0, /* no underline */
  1208.          0, /* no strikeout */
  1209.          0,
  1210.          OUT_DEFAULT_PRECIS,
  1211.          CLIP_DEFAULT_PRECIS,
  1212.          0, /* no PROOF_QUALITY */
  1213.          0,
  1214.          0);    /* Default Font Face */
  1215.  
  1216.      hFontPrintB = CreateFont (
  1217.             -MulDiv(8, PrinterYPixels, 72),
  1218.    //    40,    /* default font size */
  1219.          0,     /* width */
  1220.          0, /* escapement */
  1221.          0, /* orientation */
  1222.          FW_BOLD,
  1223.          0, /* no italics */
  1224.          0, /* no underline */
  1225.          0, /* no strikeout */
  1226.          0,
  1227.          OUT_DEFAULT_PRECIS,
  1228.          CLIP_DEFAULT_PRECIS,
  1229.          0, /* no PROOF_QUALITY */
  1230.          0,
  1231.          0);    /* default font face */
  1232.  
  1233.    hFontPrintI = CreateFont (  
  1234.             -MulDiv((int)(0.9 * 8), PrinterYPixels, 72),
  1235.    //    36,    /* default font size */
  1236.          0,     /* width */
  1237.          0, /* escapement */
  1238.          0, /* orientation */
  1239.          FW_LIGHT,
  1240.          1, /* italics */
  1241.          0, /* no underline */
  1242.          0, /* no strikeout */
  1243.          0,
  1244.          OUT_DEFAULT_PRECIS,
  1245.          CLIP_DEFAULT_PRECIS,
  1246.          0, /* no PROOF_QUALITY */
  1247.          0,
  1248.          0);    /* default font face */
  1249.  
  1250.    hFontPrintS = CreateFont (
  1251.             -MulDiv(8, PrinterYPixels, 72),
  1252.    //    60,
  1253.          0,     /* width */
  1254.          0, /* escapement */
  1255.          0, /* orientation */
  1256.          FW_EXTRABOLD,
  1257.          0, /* no italics */
  1258.          1, /* underline */
  1259.          0, /* no strikeout */
  1260.          0,
  1261.          OUT_DEFAULT_PRECIS,
  1262.          CLIP_DEFAULT_PRECIS,
  1263.          0, /* no PROOF_QUALITY */
  1264.          0,
  1265.          "Arial");
  1266.    }
  1267. }
  1268.  
  1269. void
  1270. DestroyFonts()
  1271. {
  1272.       if (hListFont) DeleteObject(hListFont);
  1273.       if (hFontArtNormal) DeleteObject(hFontArtNormal);
  1274.       if (hFontArtQuote) DeleteObject(hFontArtQuote);
  1275.       if (hStatusFont) DeleteObject(hStatusFont);
  1276.       if (hFontPrint) DeleteObject(hFontPrint);
  1277.       if (hFontPrintB) DeleteObject(hFontPrintB);
  1278.       if (hFontPrintS) DeleteObject(hFontPrintS);
  1279.       if (hFontPrintI) DeleteObject(hFontPrintI);   
  1280. }
  1281.  
  1282. /*-------------------------------------------------------------
  1283.  *
  1284.  *  Bitmap resource handlers
  1285.  *  jsc 9/10/94
  1286.  */
  1287. void
  1288. InitBitmaps()
  1289. {
  1290.     register int i;
  1291.  
  1292.     // Load drive and folder bitmaps
  1293.     for (i=IDB_DRIVEMIN; i<=IDB_DRIVEMAX; i++)
  1294.         DiskBitmaps[i-IDB_DRIVEMIN]=LoadBitmap(hInst, MAKEINTRESOURCE(i));
  1295.  
  1296.     for (i=IDB_FOLDERMIN; i<=IDB_FOLDERMAX; i++)
  1297.         FolderBitmaps[i-IDB_FOLDERMIN]=LoadBitmap(hInst, MAKEINTRESOURCE(i));
  1298.  
  1299. }
  1300.  
  1301. void
  1302. DestroyBitmaps()
  1303. {
  1304.     register int i;
  1305.     for (i=IDB_DRIVEMIN; i<=IDB_DRIVEMAX; i++)
  1306.         if (DiskBitmaps[i-IDB_DRIVEMIN]) 
  1307.             DeleteObject(DiskBitmaps[i-IDB_DRIVEMIN]);
  1308.     
  1309.     for (i=IDB_FOLDERMIN; i<=IDB_FOLDERMAX; i++)
  1310.         if (FolderBitmaps[i-IDB_FOLDERMIN])
  1311.             DeleteObject(FolderBitmaps[i-IDB_FOLDERMIN]);
  1312. }
  1313.  
  1314. /*--- Function WinVnDoComm  -----------------------------------
  1315.  *
  1316.  *  Set communications parameters.
  1317.  *
  1318.  *  Entry    szComm         is a string equivalent to that on a MODE statement.
  1319.  *                          E.g.,  "COM1:2400,n,8"
  1320.  */
  1321. int
  1322. WinVnDoComm (szComm)
  1323.      char *szComm;
  1324. {
  1325.   int retcode;
  1326.   char mesbuf[60];
  1327.  
  1328.   if (retcode = BuildCommDCB (szComm, (DCB FAR *) & DCBComm))
  1329.     {
  1330.       sprintf (mesbuf, "BuildComm returned %d", retcode);
  1331.       MessageBox (hWndConf, mesbuf, "Error building COM1 DCB", MB_OK | MB_ICONEXCLAMATION);
  1332.     }
  1333.   else
  1334.     {
  1335.       //SetCommState ((DCB FAR *) & DCBComm);
  1336.     }
  1337.   return (retcode);
  1338. }
  1339.  
  1340. /*--- Function CommStrtoID --------------------------------------
  1341.  *
  1342.  *   Takes a communications string of the form given to the MODE command
  1343.  *   and breaks it down to its constituent parts.
  1344.  *
  1345.  *   Entry    CommStr    is the string; e.g., "COM1:2400,n,8"
  1346.  *
  1347.  *   Exit     *Port      is the port (an IDD_* variable)
  1348.  *            *Parity    is the parity/data bits infor (an IDD_* symbol)
  1349.  *            szSpeed    is the speed, in character form
  1350.  *            CommStr    has been converted to upper case.
  1351.  *            Function value NULL if no error, else a pointer
  1352.  *             to an error message.
  1353.  */
  1354. char *
  1355. CommStrtoID (CommStr, Port, Parity, szSpeed)
  1356.      char *CommStr;
  1357.      int *Port, *Parity;
  1358.      char *szSpeed;
  1359. {
  1360.   char *ptr, *Speedptr;
  1361.  
  1362.   strupr (CommStr);
  1363.   ptr = CommStr;
  1364.  
  1365.   while (*(ptr) == ' ')
  1366.     ptr++;
  1367.  
  1368.   /* Crack the "COMx" part of the string.                           */
  1369.  
  1370.   if (strncmp (ptr, "COM", 3) != 0)
  1371.     return ("Must be COM port");
  1372.   ptr += 3;
  1373.  
  1374.   if (*ptr == '1')
  1375.     {
  1376.       *Port = IDD_COM1;
  1377.     }
  1378.   else if (*ptr == '2')
  1379.     {
  1380.       *Port = IDD_COM2;
  1381.     }
  1382.   else
  1383.     {
  1384.       return ("COM port must be 1 or 2");
  1385.     }
  1386.  
  1387.   /* Crack the speed parameter.                                     */
  1388.  
  1389.   ptr += 2;
  1390.   while (*ptr == ' ')
  1391.     ptr++;
  1392.   for (Speedptr = szSpeed; isdigit (*ptr); *(Speedptr++) = *(ptr++));
  1393.   *Speedptr = '\0';
  1394.  
  1395.   if (szSpeed == Speedptr)
  1396.     {
  1397.       return ("Non-numeric COM speed");
  1398.     }
  1399.  
  1400.   while (isdigit (*ptr) || *ptr == ' ' || *ptr == ',')
  1401.     ptr++;
  1402.  
  1403.   /* Crack the parity parameter.                                    */
  1404.  
  1405.   if (*ptr == 'N')
  1406.     {
  1407.       *Parity = IDD_8NONE;
  1408.     }
  1409.   else if (*ptr == 'E')
  1410.     {
  1411.       *Parity = IDD_7EVEN;
  1412.     }
  1413.   else
  1414.     {
  1415.       return ("Bad parity");
  1416.     }
  1417.  
  1418.   return (NULL);
  1419. }
  1420.  
  1421. /*--- function MainLoopPass ---------------------------------------------
  1422.  *
  1423.  *    Do one pass of the main loop.
  1424.  *
  1425.  *    Entry
  1426.  *
  1427.  *    Exit     returns result of GetMessage()
  1428.  */
  1429. BOOL
  1430. MainLoopPass ()
  1431. {
  1432.   BOOL NoQuit;
  1433.  
  1434.   if (NoQuit = GetMessage (&MainMsg, NULL, NULL, NULL))
  1435.     {
  1436.       if (!TranslateAccelerator (MainMsg.hwnd, hAccel, &MainMsg))
  1437.       {
  1438.         TranslateMessage (&MainMsg);
  1439.         DispatchMessage (&MainMsg);
  1440.       }
  1441.     }
  1442.   return (NoQuit);
  1443. }
  1444.  
  1445.  
  1446. /*--- function ReadWinvnProfile -----------------------------------------
  1447.  *
  1448.  *    Read the profile values into global vars 
  1449.  *    (JSC 1/8/94)
  1450.  */
  1451. // section headings (globals)
  1452. char OLD[6]="winvn";
  1453. char COMM[15]="Communications";
  1454. char AUTH[14]="Authorization";
  1455. char INTERFACE[10]="Interface";
  1456. char PERSONAL[9]="Personal";
  1457. char PREF[12]="Preferences";
  1458. char CODING[7]="Coding";
  1459. char MAIL_ADDRESSES[15]="Mail Addresses";
  1460. char INTERNATIONAL[5]="intl";
  1461. char SMARTFILER[12]="Smart Filer";
  1462. char SEARCHES[9]="Searches";
  1463.  
  1464. void 
  1465. ReadWinvnProfile ()
  1466. {
  1467.   char buf[MAXINTERNALLINE];
  1468.   char *ptr;
  1469.   int j;
  1470.  
  1471.   /* mail address list */
  1472.   MailList = InitTextBlock (hWndConf);
  1473.   for (j = 1;; j++)
  1474.   {
  1475.     sprintf (str, "Address%d", j);
  1476.     GetPrivateProfileString (MAIL_ADDRESSES, str, "", buf, MAILLEN, szAppProFile);
  1477.     if (!strcmp(buf, ""))
  1478.       break;
  1479.     AddLineToTextBlock (MailList, buf);
  1480.   }
  1481.   MailListOrigNum = (int)MailList->numLines;
  1482.   
  1483.   /* smart filer extension list  -- jsc 9/10/94 */
  1484.   ExtMapSourceList = InitTextBlock (hWndConf);
  1485.   ExtMapDosList = InitTextBlock (hWndConf);
  1486.   for (j = 1;; j++)
  1487.   {
  1488.     sprintf (str, "ExtConvert%d", j);
  1489.     GetPrivateProfileString (SMARTFILER, str, "", buf, MAXINTERNALLINE, szAppProFile);
  1490.     if (!strcmp(buf, ""))
  1491.       break;
  1492.     if ((ptr = strchr(buf, ',')) != NULL)
  1493.     {
  1494.        *ptr = NULL; /* replace comma with null */
  1495.        ptr++;       /* skip comma, and any whitespace */
  1496.        while (*ptr && isspace(*ptr)) ++ptr;
  1497.        /* only add entries to lists if we had two tokens, comma-separated  */
  1498.        if (*ptr) {
  1499.           AddLineToTextBlock (ExtMapSourceList, buf);
  1500.           AddLineToTextBlock (ExtMapDosList, ptr);
  1501.        }
  1502.     }
  1503.   }
  1504.   ExtListOrigNum = (int)ExtMapSourceList->numLines;
  1505.  
  1506.   /* test for existence of Comm section in ini file
  1507.    * if doesn't exist, we need to upgrade this user's INI file
  1508.    */
  1509.   if (GetPrivateProfileString (COMM, NULL, "", buf, MAXINTERNALLINE, szAppProFile) == 0)
  1510.   {
  1511.    UpdateWinvnProfile();
  1512.    return;
  1513.   }
  1514.  
  1515.   GetPrivateProfileString (PERSONAL, "UserName", DEF_UserName, UserName, MAILLEN, szAppProFile);
  1516.   GetPrivateProfileString (PERSONAL, "MailAddress", DEF_MailAddr, MailAddress, MAILLEN, szAppProFile);
  1517.   GetPrivateProfileString (PERSONAL, "Organization", DEF_Organization, Organization, MAILLEN, szAppProFile);
  1518.   GetPrivateProfileString (PERSONAL, "ReplyTo", DEF_ReplyTo, ReplyTo, MAILLEN, szAppProFile);
  1519.  
  1520.   UsingSocket =
  1521.      GetPrivateProfileInt (COMM, "UseSocket", DEF_UsingSocket, szAppProFile);
  1522.   GetPrivateProfileString (COMM, "NNTPHost", DEF_NNTPHost, NNTPHost, MAXNNTPSIZE, szAppProFile);
  1523.   GetPrivateProfileString (COMM, "SMTPHost", DEF_SMTPHost, SMTPHost, MAXNNTPSIZE, szAppProFile);
  1524.   GetPrivateProfileString (COMM, "NNTPService", DEF_NNTPService, NNTPService, MAXNNTPSIZE, szAppProFile);
  1525.   DebugComm = 
  1526.      GetPrivateProfileInt (COMM, "DebugComm", DEF_DebugComm, szAppProFile);
  1527.   
  1528.   MailDemandLogon = 
  1529.      GetPrivateProfileInt (COMM, "MailDemandLogon", DEF_MailDemandLogon, szAppProFile);
  1530.   MailForceType = 
  1531.      GetPrivateProfileInt (COMM, "MailForceType", DEF_MailForceType, szAppProFile);
  1532.  
  1533.   GetPrivateProfileString (AUTH, "NNTPUserName", DEF_NNTPUserName, NNTPUserName, MAXNNTPSIZE, szAppProFile);
  1534.   GetPrivateProfileString (AUTH, "NNTPPassword", DEF_NNTPPassword, NNTPPasswordEncrypted, 2*MAXNNTPSIZE, szAppProFile);
  1535.   AuthReqPost = GetPrivateProfileInt (AUTH, "AuthReqPost", DEF_AuthReqPost, szAppProFile);
  1536.   AuthReqMail = GetPrivateProfileInt (AUTH, "AuthReqMail", DEF_AuthReqMail, szAppProFile);
  1537.  
  1538.   GetPrivateProfileString (COMM, "GenSockDLL", DEF_GenSockDLL, GenSockDLL, MAXFILENAME+1,szAppProFile);
  1539.  
  1540.   force_xhdr =
  1541.     GetPrivateProfileInt (COMM, "ForceXhdr", DEF_ForceXhdr, szAppProFile);
  1542.  
  1543.   threadp =
  1544.     GetPrivateProfileInt (PREF, "EnableThreading", DEF_EnableThreading, szAppProFile);
  1545.   GetPrivateProfileString (PREF, "SignatureFile", DEF_SignatureFile, SigFileName, MAXFILENAME+1,szAppProFile);
  1546.  
  1547.   EnableSig =
  1548.      GetPrivateProfileInt (PREF, "EnableSignature", DEF_EnableSignature, szAppProFile);
  1549.  
  1550.   MailLog = 
  1551.      GetPrivateProfileInt (PREF, "MailLog", DEF_MailLog, szAppProFile);
  1552.   GetPrivateProfileString (PREF, "MailLogFile" , DEF_MailLogFile, MailLogFile, MAXFILENAME, szAppProFile);
  1553.   PostLog = 
  1554.      GetPrivateProfileInt (PREF, "PostLog", DEF_PostLog, szAppProFile);
  1555.   GetPrivateProfileString (PREF, "PostLogFile" ,DEF_PostLogFile, PostLogFile, MAXFILENAME, szAppProFile);
  1556.  
  1557.   DoList = 
  1558.      GetPrivateProfileInt (PREF, "DoList", DEF_DoList,szAppProFile);
  1559.   ConnectAtStartup =
  1560.      GetPrivateProfileInt (PREF, "ConnectAtStartup", DEF_ConnectAtStartup, szAppProFile);
  1561.   FullNameFrom = 
  1562.      GetPrivateProfileInt (PREF, "FullNameFrom", DEF_FullNameFrom, szAppProFile);
  1563.   article_threshold = 
  1564.      GetPrivateProfileUInt (PREF, "ArticleThreshold", DEF_ArticleThreshold, szAppProFile);
  1565.   ShowUnsubscribed = 
  1566.      GetPrivateProfileInt (PREF, "ShowUnsubscribed",DEF_ShowUnsubscribed, szAppProFile); 
  1567.   ShowReadArticles = 
  1568.      GetPrivateProfileInt (PREF,"ShowReadArticles", DEF_ShowReadArticles, szAppProFile);
  1569.   ConfirmBatchOps = 
  1570.      GetPrivateProfileInt (PREF,"ConfirmBatchOps", DEF_ConfirmBatchOps, szAppProFile);
  1571.   ConfirmExit = 
  1572.      GetPrivateProfileInt (PREF,"ConfirmExit", DEF_ConfirmExit, szAppProFile);
  1573.   ConfirmReplyTo =
  1574.      GetPrivateProfileInt (PREF,"ConfirmReplyTo", DEF_ConfirmReplyTo, szAppProFile);
  1575.   CcByMail =
  1576.      GetPrivateProfileInt (PREF,"CcByMail", DEF_CcByMail, szAppProFile);
  1577.   ViewNew = 
  1578.      GetPrivateProfileInt (PREF, "NewWndGroup", DEF_NewWndGroup, szAppProFile);
  1579.   NewArticleWindow = 
  1580.      GetPrivateProfileInt (PREF, "NewWndArticle", DEF_NewWndArticle, szAppProFile);
  1581.   SaveArtAppend = 
  1582.      GetPrivateProfileInt (PREF, "SaveArtAppend", DEF_SaveArtAppend, szAppProFile);
  1583.   ShowUnreadOnly = 
  1584.      GetPrivateProfileInt (PREF, "ShowUnreadOnly",DEF_ShowUnreadOnly, szAppProFile); 
  1585.  
  1586.   ThreadFullSubject = 
  1587.     GetPrivateProfileInt (PREF, "ThreadFullSubject", DEF_ThreadFullSubject, szAppProFile);
  1588.  
  1589.   GroupMultiSelect = 
  1590.     GetPrivateProfileInt (PREF, "GroupMultiSelect", DEF_ThreadFullSubject, szAppProFile);
  1591.  
  1592.   GetPrivateProfileString (CODING, "DecodePath", DEF_DecodePath, DecodePathName, MAXFILENAME, szAppProFile);
  1593.   CodingStatusVerbose = 
  1594.      GetPrivateProfileInt (CODING, "CodingStatusVerbose", DEF_CodingStatusVerbose, szAppProFile);
  1595.   BlockCodingStatusAlwaysOnTop =
  1596.      GetPrivateProfileInt (CODING, "BlockCodingStatusAlwaysOnTop", DEF_BlockCodingStatusAlwaysOnTop, szAppProFile);
  1597.  
  1598.   DumbDecode = 
  1599.      GetPrivateProfileInt (CODING, "DumbDecode", DEF_DumbDecode, szAppProFile);
  1600.   ReviewAttach = 
  1601.      GetPrivateProfileInt (CODING, "ReviewAttach", DEF_ReviewAttach, szAppProFile);
  1602.   ArticleSplitLength = 
  1603.       GetPrivateProfileUInt (CODING, "ArticleSplitLength", (unsigned int) DEF_ArticleSplitLength, szAppProFile);
  1604.   GetPrivateProfileString (CODING, "EncodingTable", DEF_EncodingTable, UserCodingTable, CODINGTABLESIZE+1, szAppProFile);
  1605.   GetPrivateProfileString (CODING, "SubjectTemplate", "%s  -  %f [%p/%t]", SubjectTemplate, CODINGTABLESIZE+1, szAppProFile);
  1606.   GenerateMIME = 
  1607.      GetPrivateProfileInt (CODING, "GenerateMIME", DEF_GenerateMIME, szAppProFile);
  1608.   MIMEUsageSuggestions = 
  1609.      GetPrivateProfileInt (CODING, "MIMEUsageSuggestions", DEF_MIMEUsageSuggestions, szAppProFile);
  1610.   GetPrivateProfileString (CODING, "MIMEBoundary",DEF_MIMEBoundary, MIMEBoundary, MAXINTERNALLINE, szAppProFile);
  1611.   BlankBeforeMIME =
  1612.      GetPrivateProfileInt (CODING, "BlankBeforeMIME", DEF_BlankBeforeMIME, szAppProFile);
  1613.   GetPrivateProfileString (CODING, "EncodingType", DEF_EncodingType, EncodingType, MAXINTERNALLINE, szAppProFile);
  1614.   EncodingTypeNum = EncodingTypeToNum (EncodingType);
  1615.   GetPrivateProfileString (CODING, "MIMEUUType", DEF_MIMEUUType, MIMEUUType, 80, szAppProFile);
  1616.   GetPrivateProfileString (CODING, "MIMEXXType", DEF_MIMEXXType, MIMEXXType, 80, szAppProFile);
  1617.   GetPrivateProfileString (CODING, "MIMECustomType", DEF_MIMECustomType, MIMECustomType, 80, szAppProFile);
  1618.   
  1619.   GetPrivateProfileString (CODING, "DefaultContentType",DEF_DefaultContentType, DefaultContentType, MAXINTERNALLINE, szAppProFile);
  1620.   AttachInNewArt =
  1621.      GetPrivateProfileInt (CODING, "AttachInNewArt", DEF_AttachInNewArt, szAppProFile);
  1622.   ExecuteDecodedFiles =
  1623.      GetPrivateProfileInt (CODING, "ExecuteDecodedFiles", DEF_ExecuteDecodedFiles, szAppProFile);
  1624.   KeepArticleHeaderVisible =
  1625.      GetPrivateProfileInt (CODING, "KeepArticleHeaderVisible", DEF_KeepArticleHeaderVisible, szAppProFile);
  1626.   UseSmartFiler =
  1627.      GetPrivateProfileInt (CODING, "UseSmartFiler", DEF_UseSmartFiler, szAppProFile);
  1628.  
  1629.   GetPrivateProfileString (INTERFACE, "ListFontFace", DEF_ListFontFace, ListFontFace, 32,szAppProFile);
  1630.   ListFontSize = 
  1631.      GetPrivateProfileInt (INTERFACE, "ListFontSize", DEF_ListFontSize, szAppProFile);
  1632.   GetPrivateProfileString (INTERFACE, "ListFontStyle", DEF_ListFontStyle, ListFontStyle, 32, szAppProFile);
  1633. //  FontBold = 
  1634. //     GetPrivateProfileInt (INTERFACE, "FontBold", TRUE, szAppProFile);
  1635.   GetPrivateProfileString (INTERFACE, "ArticleFontFace", DEF_ArticleFontFace, ArticleFontFace, 32, szAppProFile);
  1636.   ArticleFontSize = 
  1637.      GetPrivateProfileInt (INTERFACE, "ArticleFontSize", DEF_ArticleFontSize, szAppProFile);
  1638.   GetPrivateProfileString (INTERFACE, "ArticleFontStyle", DEF_ArticleFontStyle, ArticleFontStyle, 32, szAppProFile);
  1639.   GetPrivateProfileString (INTERFACE, "StatusFontFace", DEF_StatusFontFace, StatusFontFace, 32, szAppProFile);
  1640.   StatusFontSize = 
  1641.      GetPrivateProfileInt (INTERFACE, "StatusFontSize", DEF_StatusFontSize, szAppProFile);
  1642.   GetPrivateProfileString (INTERFACE, "StatusFontStyle", DEF_StatusFontStyle, StatusFontStyle, 32, szAppProFile);
  1643.   GetPrivateProfileString (INTERFACE, "PrintFontFace", DEF_PrintFontFace, PrintFontFace, 32, szAppProFile);
  1644.   PrintFontSize = 
  1645.      GetPrivateProfileInt (INTERFACE, "PrintFontSize", DEF_PrintFontSize, szAppProFile);
  1646. //  ArticleFixedFont = 
  1647. //     GetPrivateProfileInt (INTERFACE, "ArticleFixedFont", FALSE, szAppProFile);
  1648.   ArticleFixedFont = 0;
  1649.   GetPrivateProfileString (INTERFACE, "NetUnSubscribedColor", DEF_NetUnSubscribedColor, buf, 32, szAppProFile);
  1650.   NetUnSubscribedColor = StrToRGB (buf);
  1651.   GetPrivateProfileString (INTERFACE, "NetSubscribedColor", DEF_NetSubscribedColor, buf, 32, szAppProFile);
  1652.   NetSubscribedColor = StrToRGB (buf);
  1653.   GetPrivateProfileString (INTERFACE, "ArticleUnSeenColor", DEF_ArticleUnSeenColor, buf, 32, szAppProFile);
  1654.   ArticleUnSeenColor = StrToRGB (buf);
  1655.   GetPrivateProfileString (INTERFACE, "ArticleSeenColor", DEF_ArticleSeenColor, buf, 32, szAppProFile);
  1656.   ArticleSeenColor = StrToRGB (buf);
  1657.   GetPrivateProfileString (INTERFACE, "ArticleTextColor", DEF_ArticleTextColor, buf, 32, szAppProFile);
  1658.   ArticleTextColor = StrToRGB (buf);
  1659.   GetPrivateProfileString (INTERFACE, "StatusTextColor", DEF_StatusTextColor, buf, 32, szAppProFile);
  1660.   StatusTextColor = StrToRGB (buf);
  1661.   GetPrivateProfileString (INTERFACE, "ArticleBackgroundColor", DEF_ArticleBackgroundColor, buf, 32, szAppProFile);
  1662.   ArticleBackgroundColor = StrToRGB (buf);
  1663.   GetPrivateProfileString (INTERFACE, "ListBackgroundColor", DEF_ListBackgroundColor, buf, 32, szAppProFile);
  1664.   ListBackgroundColor = StrToRGB (buf);
  1665.   GetPrivateProfileString (INTERFACE, "StatusBackgroundColor", DEF_StatusBackgroundColor, buf, 32, szAppProFile);
  1666.   StatusBackgroundColor = StrToRGB (buf);
  1667.   ThumbTrack = 
  1668.      GetPrivateProfileInt (INTERFACE, "ThumbTrack", DEF_ThumbTrack, szAppProFile);
  1669.  
  1670.   GetPrivateProfileString (SEARCHES, "LastArticleTextFind", "", LastArticleTextFind, MAXINTERNALLINE, szAppProFile);
  1671.   GetPrivateProfileString (SEARCHES, "LastArticleHeaderFind", "", LastArticleHeaderFind, MAXINTERNALLINE, szAppProFile);
  1672.   GetPrivateProfileString (SEARCHES, "LastGroupNameFind", "", LastGroupNameFind, MAXINTERNALLINE, szAppProFile);
  1673.  
  1674.   OnDupeName = 
  1675.      GetPrivateProfileInt (SMARTFILER, "OnDupeName", DEF_OnDupeName, szAppProFile);
  1676.   OnNameTooLong = 
  1677.      GetPrivateProfileInt (SMARTFILER, "OnNameTooLong", DEF_OnNameTooLong, szAppProFile);
  1678.   MaxFileNameLen = 
  1679.      GetPrivateProfileInt (SMARTFILER, "MaxFileNameLen", DEF_MaxFileNameLen, szAppProFile);
  1680.   MaxFileExtLen = 
  1681.      GetPrivateProfileInt (SMARTFILER, "MaxFileExtLen", DEF_MaxFileExtLen, szAppProFile);
  1682.   EnableExtensionConversion =
  1683.      GetPrivateProfileInt (SMARTFILER, "EnableExtensionConversion", DEF_EnableExtensionConversion, szAppProFile);
  1684.  
  1685.  
  1686.   // The following is in WIN.INI (??)
  1687.   GetProfileString (INTERNATIONAL, "sDate", "." ,fmtDateDelim ,2 );
  1688. //  fmtDateDelim[1]=0 ;
  1689.    fmtDaysB4Mth = (1 == GetProfileInt (INTERNATIONAL,"iDate", 0 /* US Date Format*/));
  1690.  
  1691.   
  1692. #if 0
  1693. // Disabled serial comm stuff
  1694.   AskComm = 
  1695.      GetPrivateProfileInt (COMM, "AskComm", ASK_COMM_INITIAL, szAppProFile);
  1696.   GetPrivateProfileString (COMM, "CommString", "COM1:9600,e,7", szCommString, MAXCOMMCHARS,szAppProFile);
  1697.   errptr = CommStrtoID (szCommString, &CommPortID, &CommParityID, pszCommSpeed);
  1698.   if (errptr)
  1699.     {
  1700.       strcpy (mesbuf, "Error parsing ");
  1701.       strcat (mesbuf, szCommString);
  1702.       MessageBox (hWndConf, errptr, mesbuf, MB_OK | MB_ICONEXCLAMATION);
  1703.     }
  1704. #endif
  1705. }
  1706.  
  1707. /*--- function WriteWinvnProfile -----------------------------------------
  1708.  *
  1709.  *    Write the values modifiable in WinVn menus to the profile 
  1710.  *    (JSC 1/8/94)
  1711.  */
  1712. void 
  1713. WriteWinvnProfile ()
  1714. {
  1715.   char buf[MAXINTERNALLINE];
  1716.   register int j;
  1717.   
  1718.   WritePrivateProfileString (PERSONAL, "UserName", UserName, szAppProFile);
  1719.   WritePrivateProfileString (PERSONAL, "MailAddress", MailAddress, szAppProFile);
  1720.   WritePrivateProfileString (PERSONAL, "Organization", Organization, szAppProFile);
  1721.   WritePrivateProfileString (PERSONAL, "ReplyTo", ReplyTo, szAppProFile);
  1722.  
  1723. //WritePrivateProfileInt    (COMM, "AskComm", AskComm, szAppProFile);
  1724. //WritePrivateProfileString (COMM, "CommString", szCommString, szAppProFile);
  1725.   WritePrivateProfileInt    (COMM, "UseSocket", UsingSocket, szAppProFile);
  1726.   WritePrivateProfileString (COMM, "NNTPHost", NNTPHost, szAppProFile);
  1727.   WritePrivateProfileString (COMM, "SMTPHost", SMTPHost, szAppProFile);
  1728.   WritePrivateProfileString (COMM, "NNTPService", NNTPService, szAppProFile);
  1729.   WritePrivateProfileInt    (COMM, "MailDemandLogon", MailDemandLogon, szAppProFile);
  1730.   WritePrivateProfileInt    (COMM, "MailForceType", MailForceType, szAppProFile);
  1731.   WritePrivateProfileInt    (COMM, "DebugComm", DebugComm, szAppProFile);
  1732.   WritePrivateProfileString (COMM, "GenSockDLL", GenSockDLL, szAppProFile);
  1733.   
  1734.   WritePrivateProfileString (AUTH, "NNTPUserName", NNTPUserName, szAppProFile);
  1735.   WritePrivateProfileString (AUTH, "NNTPPassword", NNTPPasswordEncrypted, szAppProFile);
  1736.  
  1737.   WritePrivateProfileInt    (PREF, "EnableThreading", threadp, szAppProFile);
  1738.   WritePrivateProfileString (PREF, "SignatureFile", SigFileName, szAppProFile);
  1739.   WritePrivateProfileInt    (PREF, "EnableSignature", EnableSig, szAppProFile);
  1740. //  WritePrivateProfileString (PREF, "MailListFile", MailFileName, szAppProFile);
  1741.  
  1742.   WritePrivateProfileInt    (PREF, "MailLog", MailLog, szAppProFile);
  1743.   WritePrivateProfileString (PREF, "MailLogFile", MailLogFile, szAppProFile);
  1744.   WritePrivateProfileInt    (PREF, "PostLog", PostLog, szAppProFile);
  1745.   WritePrivateProfileString (PREF, "PostLogFile", PostLogFile, szAppProFile);
  1746.  
  1747.   WritePrivateProfileInt    (PREF, "DoList", DoList, szAppProFile);
  1748.   WritePrivateProfileInt    (PREF, "ConnectAtStartup", ConnectAtStartup, szAppProFile);
  1749.   WritePrivateProfileInt    (PREF, "FullNameFrom", FullNameFrom, szAppProFile);
  1750.   WritePrivateProfileUInt   (PREF, "ArticleThreshold", article_threshold, szAppProFile);
  1751.   WritePrivateProfileInt    (PREF, "ShowUnsubscribed", ShowUnsubscribed, szAppProFile);
  1752.   WritePrivateProfileInt    (PREF, "ShowReadArticles", ShowReadArticles, szAppProFile);
  1753.   WritePrivateProfileInt    (PREF, "ConfirmBatchOps", ConfirmBatchOps, szAppProFile);
  1754.   WritePrivateProfileInt    (PREF, "ConfirmExit", ConfirmExit, szAppProFile);
  1755.   WritePrivateProfileInt    (PREF, "ConfirmReplyTo", ConfirmReplyTo, szAppProFile);
  1756.   WritePrivateProfileInt    (PREF, "CcByMail", CcByMail, szAppProFile);
  1757.   WritePrivateProfileInt    (PREF, "NewWndGroup", ViewNew, szAppProFile);
  1758.   WritePrivateProfileInt    (PREF, "NewWndArticle", NewArticleWindow, szAppProFile);
  1759.   WritePrivateProfileInt    (PREF, "SaveArtAppend", SaveArtAppend, szAppProFile);
  1760.   WritePrivateProfileInt    (PREF, "ThreadFullSubject", ThreadFullSubject, szAppProFile);
  1761.   WritePrivateProfileInt    (PREF, "GroupMultiSelect", GroupMultiSelect, szAppProFile);
  1762.   WritePrivateProfileInt    (PREF, "ShowUnreadOnly", ShowUnreadOnly, szAppProFile);
  1763.  
  1764.   WritePrivateProfileString (CODING, "DecodePath", DecodePathName, szAppProFile);
  1765.   WritePrivateProfileInt    (CODING, "CodingStatusVerbose", CodingStatusVerbose, szAppProFile);
  1766.   WritePrivateProfileInt    (CODING, "BlockCodingStatusAlwaysOnTop", BlockCodingStatusAlwaysOnTop, szAppProFile);
  1767.   WritePrivateProfileInt    (CODING, "DumbDecode", DumbDecode, szAppProFile);
  1768.   WritePrivateProfileInt    (CODING, "ReviewAttach", ReviewAttach, szAppProFile);
  1769.   WritePrivateProfileInt    (CODING, "AttachInNewArt", AttachInNewArt, szAppProFile);
  1770.   WritePrivateProfileInt    (CODING, "ExecuteDecodedFiles", ExecuteDecodedFiles, szAppProFile);
  1771.   WritePrivateProfileInt    (CODING, "KeepArticleHeaderVisible", KeepArticleHeaderVisible, szAppProFile);
  1772.   WritePrivateProfileInt    (CODING, "UseSmartFiler", UseSmartFiler, szAppProFile);
  1773.   WritePrivateProfileUInt   (CODING, "ArticleSplitLength", ArticleSplitLength, szAppProFile);
  1774.   WritePrivateProfileString (CODING, "EncodingType", EncodingType, szAppProFile);
  1775.   WritePrivateProfileString (CODING, "EncodingTable", UserCodingTable, szAppProFile);
  1776.   WritePrivateProfileString (CODING, "SubjectTemplate", SubjectTemplate, szAppProFile);
  1777.   WritePrivateProfileInt    (CODING, "GenerateMIME", GenerateMIME, szAppProFile);
  1778.   WritePrivateProfileInt    (CODING, "MIMEUsageSuggestions", MIMEUsageSuggestions, szAppProFile);
  1779.   WritePrivateProfileString (CODING, "MIMEBoundary", MIMEBoundary, szAppProFile);
  1780.   WritePrivateProfileString (CODING, "MIMEUUType", MIMEUUType, szAppProFile);
  1781.   WritePrivateProfileString (CODING, "MIMEXXType", MIMEXXType, szAppProFile);
  1782.   WritePrivateProfileString (CODING, "MIMECustomType", MIMECustomType, szAppProFile);
  1783.   WritePrivateProfileInt    (CODING, "BlankBeforeMIME", BlankBeforeMIME, szAppProFile);
  1784.   WritePrivateProfileString (CODING, "DefaultContentType", DefaultContentType, szAppProFile);
  1785.  
  1786.   WritePrivateProfileString (INTERFACE, "ListFontFace", ListFontFace, szAppProFile);
  1787.   WritePrivateProfileInt    (INTERFACE, "ListFontSize", ListFontSize, szAppProFile);
  1788.   WritePrivateProfileString (INTERFACE, "ListFontStyle", ListFontStyle, szAppProFile);
  1789.   WritePrivateProfileString (INTERFACE, "ArticleFontFace", ArticleFontFace, szAppProFile);
  1790.   WritePrivateProfileInt    (INTERFACE, "ArticleFontSize", ArticleFontSize, szAppProFile);
  1791.   WritePrivateProfileString (INTERFACE, "ArticleFontStyle", ArticleFontStyle, szAppProFile);
  1792.   WritePrivateProfileString (INTERFACE, "StatusFontFace", StatusFontFace, szAppProFile);
  1793.   WritePrivateProfileInt    (INTERFACE, "StatusFontSize", StatusFontSize, szAppProFile);
  1794.   WritePrivateProfileString (INTERFACE, "StatusFontStyle", StatusFontStyle, szAppProFile);
  1795.   WritePrivateProfileString (INTERFACE, "PrintFontFace", PrintFontFace, szAppProFile);
  1796.   WritePrivateProfileInt    (INTERFACE, "PrintFontSize", PrintFontSize, szAppProFile);
  1797. //  WritePrivateProfileInt    (INTERFACE, "FontBold", FontBold, szAppProFile);
  1798. //  WritePrivateProfileInt    (INTERFACE, "ArticleFixedFont", ArticleFixedFont, szAppProFile);
  1799.   WritePrivateProfileString (INTERFACE, "NetUnSubscribedColor", RGBToStr(str, NetUnSubscribedColor), szAppProFile);
  1800.   WritePrivateProfileString (INTERFACE, "NetSubscribedColor", RGBToStr(str, NetSubscribedColor), szAppProFile);
  1801.   WritePrivateProfileString (INTERFACE, "ArticleUnSeenColor", RGBToStr(str, ArticleUnSeenColor), szAppProFile);
  1802.   WritePrivateProfileString (INTERFACE, "ArticleSeenColor", RGBToStr(str, ArticleSeenColor), szAppProFile);
  1803.   WritePrivateProfileString (INTERFACE, "ArticleTextColor", RGBToStr(str, ArticleTextColor), szAppProFile);
  1804.   WritePrivateProfileString (INTERFACE, "StatusTextColor", RGBToStr(str, StatusTextColor), szAppProFile);
  1805.   WritePrivateProfileString (INTERFACE, "ArticleBackgroundColor", RGBToStr(str, ArticleBackgroundColor), szAppProFile);
  1806.   WritePrivateProfileString (INTERFACE, "ListBackgroundColor", RGBToStr(str, ListBackgroundColor), szAppProFile);
  1807.   WritePrivateProfileString (INTERFACE, "StatusBackgroundColor", RGBToStr(str, StatusBackgroundColor), szAppProFile);
  1808.   WritePrivateProfileInt    (INTERFACE, "ThumbTrack", ThumbTrack, szAppProFile);
  1809.  
  1810.   WritePrivateProfileString (SEARCHES, "LastArticleTextFind", LastArticleTextFind, szAppProFile);
  1811.   WritePrivateProfileString (SEARCHES, "LastArticleHeaderFind", LastArticleHeaderFind, szAppProFile);
  1812.   WritePrivateProfileString (SEARCHES, "LastGroupNameFind", LastGroupNameFind, szAppProFile);
  1813.  
  1814.   WritePrivateProfileInt    (SMARTFILER, "OnDupeName", OnDupeName, szAppProFile);
  1815.   WritePrivateProfileInt    (SMARTFILER, "OnNameTooLong", OnNameTooLong, szAppProFile);
  1816.   WritePrivateProfileInt    (SMARTFILER, "MaxFileNameLen", MaxFileNameLen, szAppProFile);
  1817.   WritePrivateProfileInt    (SMARTFILER, "MaxFileExtLen", MaxFileExtLen, szAppProFile);
  1818.   WritePrivateProfileInt    (SMARTFILER, "EnableExtensionConversion", EnableExtensionConversion, szAppProFile);
  1819.  
  1820.   if (MailList) {
  1821.     for (j = 0; j < max(MailListOrigNum, (int)MailList->numLines); j++)
  1822.     {
  1823.       sprintf (str, "Address%d", j+1);
  1824.       WritePrivateProfileString (MAIL_ADDRESSES, str, 
  1825.          (j >= (int)MailList->numLines)?"":TextBlockLine(MailList, j), szAppProFile);
  1826.     }
  1827.   }
  1828.  
  1829.   if (ExtMapSourceList && ExtMapDosList) {
  1830.     for (j = 0; j < max(ExtListOrigNum, (int)ExtMapSourceList->numLines); j++)
  1831.     {
  1832.       sprintf (str, "ExtConvert%d", j+1);
  1833.       if (j >= (int)ExtMapSourceList->numLines)
  1834.          buf[0]='\0';
  1835.       else
  1836.          _snprintf(buf, MAXINTERNALLINE-1, "%s,%s", 
  1837.             TextBlockLine(ExtMapSourceList, j), TextBlockLine(ExtMapDosList, j));
  1838.          
  1839.       WritePrivateProfileString (SMARTFILER, str, buf, szAppProFile);
  1840.     }
  1841.   }
  1842. }
  1843.  
  1844. /*--- function UpdateWinvnProfile -----------------------------------------
  1845.  *
  1846.  *    Upgrades a user's old style of WinVn.ini to the new style
  1847.  *    (JSC 1/8/94)
  1848.  */
  1849. void
  1850. UpdateWinvnProfile ()
  1851. {
  1852.   char buf[512];
  1853.   
  1854.  
  1855.   GetPrivateProfileString (OLD, "UserName", DEF_UserName, UserName, MAILLEN, szAppProFile);
  1856.   GetPrivateProfileString (OLD, "MailAddress", DEF_MailAddr, MailAddress, MAILLEN, szAppProFile);
  1857.   GetPrivateProfileString (OLD, "Organization", DEF_Organization, Organization, MAILLEN, szAppProFile);
  1858.   GetPrivateProfileString (OLD, "ReplyTo", DEF_ReplyTo, ReplyTo, MAILLEN, szAppProFile);
  1859.  
  1860.   UsingSocket =
  1861.      GetPrivateProfileInt (OLD, "UseSocket", DEF_UsingSocket, szAppProFile);
  1862.   GetPrivateProfileString (OLD, "NNTPHost", DEF_NNTPHost, NNTPHost, MAXNNTPSIZE, szAppProFile);
  1863.   GetPrivateProfileString (OLD, "SMTPHost", DEF_SMTPHost, SMTPHost, MAXNNTPSIZE, szAppProFile);
  1864.   GetPrivateProfileString (OLD, "NNTPService", DEF_NNTPService, NNTPService, MAXNNTPSIZE, szAppProFile);
  1865.   DebugComm = 
  1866.      GetPrivateProfileInt (OLD, "DebugComm", DEF_DebugComm, szAppProFile);
  1867.   MailDemandLogon = 
  1868.      GetPrivateProfileInt (OLD, "MailDemandLogon", DEF_MailDemandLogon, szAppProFile);
  1869.   MailForceType = 
  1870.      GetPrivateProfileInt (OLD, "MailForceType", DEF_MailForceType, szAppProFile);
  1871.  
  1872.   GetPrivateProfileString (OLD, "NNTPUserName", DEF_NNTPUserName, NNTPUserName, MAXNNTPSIZE, szAppProFile);
  1873.   GetPrivateProfileString (OLD, "NNTPPassword", DEF_NNTPPassword, NNTPPasswordEncrypted, 2*MAXNNTPSIZE, szAppProFile);
  1874.  
  1875.   threadp =
  1876.      GetPrivateProfileInt (OLD, "EnableThreading", DEF_EnableThreading, szAppProFile);
  1877.   GetPrivateProfileString (OLD, "SignatureFile", DEF_SignatureFile, SigFileName, MAXFILENAME+1,szAppProFile);
  1878. //  GetPrivateProfileString (OLD, "MailListFile", DEF_MailFileName, MailFileName, MAXFILENAME+1,szAppProFile);
  1879.   EnableSig =
  1880.      GetPrivateProfileInt (OLD, "EnableSignature", DEF_EnableSignature, szAppProFile);
  1881.  
  1882.   MailLog = 
  1883.      GetPrivateProfileInt (OLD, "MailLog", DEF_MailLog, szAppProFile);
  1884.   GetPrivateProfileString (OLD, "MailLogFile" , DEF_MailLogFile, MailLogFile, MAXFILENAME, szAppProFile);
  1885.   PostLog = 
  1886.      GetPrivateProfileInt (OLD, "PostLog", DEF_PostLog, szAppProFile);
  1887.   GetPrivateProfileString (OLD, "PostLogFile" ,DEF_PostLogFile, PostLogFile, MAXFILENAME, szAppProFile);
  1888.  
  1889.   ConnectAtStartup =
  1890.      GetPrivateProfileInt (OLD, "ConnectAtStartup", DEF_ConnectAtStartup,szAppProFile);
  1891.   FullNameFrom = 
  1892.      GetPrivateProfileInt (OLD, "FullNameFrom", DEF_FullNameFrom, szAppProFile);
  1893.   article_threshold = 
  1894.      GetPrivateProfileUInt (OLD, "ArticleThreshold", DEF_ArticleThreshold, szAppProFile);
  1895.   ShowUnsubscribed = 
  1896.      GetPrivateProfileInt (OLD, "ShowUnsubscribed",DEF_ShowUnsubscribed, szAppProFile); 
  1897.   ShowReadArticles = 
  1898.      GetPrivateProfileInt (OLD,"ShowReadArticles", DEF_ShowReadArticles, szAppProFile);
  1899.   ConfirmBatchOps = 
  1900.      GetPrivateProfileInt (OLD,"ConfirmBatchOps", DEF_ConfirmBatchOps, szAppProFile);
  1901.   ConfirmExit = 
  1902.      GetPrivateProfileInt (OLD,"ConfirmExit", DEF_ConfirmExit, szAppProFile);
  1903.   ConfirmReplyTo =
  1904.      GetPrivateProfileInt (OLD, "ConfirmReplyTo", DEF_ConfirmReplyTo, szAppProFile);
  1905.   CcByMail =
  1906.      GetPrivateProfileInt (OLD,"CcByMail", DEF_CcByMail, szAppProFile);
  1907.   ViewNew = 
  1908.      GetPrivateProfileInt (OLD, "NewWndGroup", DEF_NewWndGroup, szAppProFile);
  1909.   NewArticleWindow = 
  1910.      GetPrivateProfileInt (OLD, "NewWndArticle", DEF_NewWndArticle, szAppProFile);
  1911.   SaveArtAppend = 
  1912.      GetPrivateProfileInt (OLD, "SaveArtAppend", DEF_SaveArtAppend, szAppProFile);
  1913.   ShowUnreadOnly = 
  1914.      GetPrivateProfileInt (OLD, "ShowUnreadOnly",DEF_ShowUnreadOnly, szAppProFile); 
  1915.  
  1916.   GetPrivateProfileString (OLD, "DecodePath", DEF_DecodePath, DecodePathName, MAXFILENAME, szAppProFile);
  1917.   CodingStatusVerbose = 
  1918.      GetPrivateProfileInt (OLD, "CodingStatusVerbose", DEF_CodingStatusVerbose, szAppProFile);
  1919.   BlockCodingStatusAlwaysOnTop =
  1920.      GetPrivateProfileInt (OLD, "BlockCodingStatusAlwaysOnTop", DEF_BlockCodingStatusAlwaysOnTop, szAppProFile);
  1921.   DumbDecode = 
  1922.      GetPrivateProfileInt (OLD, "DumbDecode", DEF_DumbDecode, szAppProFile);
  1923.   ReviewAttach = 
  1924.      GetPrivateProfileInt (OLD, "ReviewAttach", DEF_ReviewAttach, szAppProFile);
  1925.   GenerateMIME = 
  1926.      GetPrivateProfileInt (OLD, "GenerateMIME", DEF_GenerateMIME, szAppProFile);
  1927.   MIMEUsageSuggestions = 
  1928.      GetPrivateProfileInt (OLD, "MIMEUsageSuggestions", DEF_MIMEUsageSuggestions, szAppProFile);
  1929.   GetPrivateProfileString (OLD, "EncodingType", DEF_EncodingType, DefaultContentType, MAXINTERNALLINE, szAppProFile);
  1930.   EncodingTypeNum = EncodingTypeToNum (EncodingType);
  1931.   GetPrivateProfileString (OLD, "MIMEUUType", DEF_MIMEUUType, MIMEUUType, 80, szAppProFile);
  1932.   GetPrivateProfileString (OLD, "MIMEXXType", DEF_MIMEXXType, MIMEXXType, 80, szAppProFile);
  1933.   GetPrivateProfileString (OLD, "MIMECustomType", DEF_MIMECustomType, MIMEXXType, 80, szAppProFile);
  1934.   GetPrivateProfileString (OLD, "DefaultContentType",DEF_DefaultContentType, DefaultContentType, MAXINTERNALLINE, szAppProFile);
  1935.   AttachInNewArt =
  1936.      GetPrivateProfileInt (OLD, "AttachInNewArt", DEF_AttachInNewArt, szAppProFile);
  1937.   ExecuteDecodedFiles =
  1938.      GetPrivateProfileInt (OLD, "ExecuteDecodedFiles", DEF_ExecuteDecodedFiles, szAppProFile);
  1939.   KeepArticleHeaderVisible =
  1940.      GetPrivateProfileInt (OLD, "KeepArticleHeaderVisible", DEF_KeepArticleHeaderVisible, szAppProFile);
  1941.   UseSmartFiler =
  1942.      GetPrivateProfileInt (OLD, "UseSmartFiler", DEF_UseSmartFiler, szAppProFile);
  1943.  
  1944.   ArticleSplitLength = 
  1945.       GetPrivateProfileUInt (OLD, "ArticleSplitLength", (unsigned int) DEF_ArticleSplitLength, szAppProFile);
  1946.   GetPrivateProfileString (OLD, "EncodingTable", DEF_EncodingTable, UserCodingTable, CODINGTABLESIZE+1, szAppProFile);
  1947.   GetPrivateProfileString (OLD, "SubjectTemplate", "%s  -  %f [%p/%t]", SubjectTemplate, CODINGTABLESIZE+1, szAppProFile);
  1948.   GetPrivateProfileString (OLD, "MIMEBoundary",DEF_MIMEBoundary, MIMEBoundary, MAXINTERNALLINE, szAppProFile);
  1949.   BlankBeforeMIME =
  1950.      GetPrivateProfileInt (OLD, "BlankBeforeMIME", DEF_BlankBeforeMIME, szAppProFile);
  1951.  
  1952.   GetPrivateProfileString (OLD, "ListFontFace", DEF_ListFontFace, ListFontFace, 32,szAppProFile);
  1953.   ListFontSize = 
  1954.      GetPrivateProfileInt (OLD, "ListFontSize", DEF_ListFontSize, szAppProFile);
  1955.   GetPrivateProfileString (OLD, "ListFontStyle", DEF_ListFontStyle, ListFontStyle, 32, szAppProFile);
  1956. //  FontBold = 
  1957. //     GetPrivateProfileInt (OLD, "FontBold", TRUE, szAppProFile);
  1958.   GetPrivateProfileString (OLD, "ArticleFontFace", DEF_ArticleFontFace, ArticleFontFace, 32, szAppProFile);
  1959.   ArticleFontSize = 
  1960.      GetPrivateProfileInt (OLD, "ArticleFontSize", DEF_ArticleFontSize, szAppProFile);
  1961.   GetPrivateProfileString (OLD, "ArticleFontStyle", DEF_ArticleFontStyle, ArticleFontStyle, 32, szAppProFile);
  1962.   GetPrivateProfileString (OLD, "StatusFontFace", DEF_StatusFontFace, StatusFontFace, 32, szAppProFile);
  1963.   StatusFontSize = 
  1964.      GetPrivateProfileInt (OLD, "StatusFontSize", DEF_StatusFontSize, szAppProFile);
  1965.   GetPrivateProfileString (OLD, "StatusFontStyle", DEF_StatusFontStyle, StatusFontStyle, 32, szAppProFile);
  1966.   GetPrivateProfileString (OLD, "PrintFontFace", DEF_PrintFontFace, PrintFontFace, 32, szAppProFile);
  1967.   PrintFontSize = 
  1968.      GetPrivateProfileInt (OLD, "PrintFontSize", DEF_PrintFontSize, szAppProFile);
  1969. //
  1970. // Previous versions of WINVN.INI stored fonts in Device dependent units
  1971. // instead of Device Independent font sizes.  Since we can't safely 
  1972. // convert, set font to something reasonable.   (JD 4/22/94)
  1973. //
  1974.   if (ArticleFontSize && (ArticleFontSize == 0 || ArticleFontSize > 16))
  1975.      ArticleFontSize = 10;
  1976.   if (ListFontSize && (ListFontSize == 0 || ListFontSize > 16))
  1977.      ListFontSize = 10;
  1978.   if (StatusFontSize && (StatusFontSize == 0 || StatusFontSize > 16))
  1979.      StatusFontSize = 11;
  1980.   if (PrintFontSize && (PrintFontSize == 0 || PrintFontSize > 16))
  1981.      PrintFontSize = 10;
  1982.  
  1983.   ArticleFixedFont = 0;
  1984.   GetPrivateProfileString (OLD, "NetUnSubscribedColor", DEF_NetUnSubscribedColor, buf, 32, szAppProFile);
  1985.   NetUnSubscribedColor = StrToRGB (buf);
  1986.   GetPrivateProfileString (OLD, "NetSubscribedColor", DEF_NetSubscribedColor, buf, 32, szAppProFile);
  1987.   NetSubscribedColor = StrToRGB (buf);
  1988.   GetPrivateProfileString (OLD, "ArticleUnSeenColor", DEF_ArticleUnSeenColor, buf, 32, szAppProFile);
  1989.   ArticleUnSeenColor = StrToRGB (buf);
  1990.   GetPrivateProfileString (OLD, "ArticleSeenColor", DEF_ArticleSeenColor, buf, 32, szAppProFile);
  1991.   ArticleSeenColor = StrToRGB (buf);
  1992.   GetPrivateProfileString (OLD, "ArticleTextColor", DEF_ArticleTextColor, buf, 32, szAppProFile);
  1993.   ArticleTextColor = StrToRGB (buf);
  1994.   GetPrivateProfileString (OLD, "StatusTextColor", DEF_StatusTextColor, buf, 32, szAppProFile);
  1995.   StatusTextColor = StrToRGB (buf);
  1996.   GetPrivateProfileString (OLD, "ArticleBackgroundColor", DEF_ArticleBackgroundColor, buf, 32, szAppProFile);
  1997.   ArticleBackgroundColor = StrToRGB (buf);
  1998.   GetPrivateProfileString (OLD, "ListBackgroundColor", DEF_ListBackgroundColor, buf, 32, szAppProFile);
  1999.   ListBackgroundColor = StrToRGB (buf);
  2000.   GetPrivateProfileString (OLD, "StatusBackgroundColor", DEF_StatusBackgroundColor, buf, 32, szAppProFile);
  2001.   StatusBackgroundColor = StrToRGB (buf);
  2002.   ThumbTrack = 
  2003.      GetPrivateProfileInt (OLD, "ThumbTrack", DEF_ThumbTrack, szAppProFile);
  2004.  
  2005.   GetPrivateProfileString (OLD, "LastArticleTextFind", "", LastArticleTextFind, MAXINTERNALLINE, szAppProFile);
  2006.   GetPrivateProfileString (OLD, "LastArticleHeaderFind", "", LastArticleHeaderFind, MAXINTERNALLINE, szAppProFile);
  2007.   GetPrivateProfileString (OLD, "LastGroupNameFind", "", LastGroupNameFind, MAXINTERNALLINE, szAppProFile);
  2008.  
  2009.   OnDupeName = 
  2010.      GetPrivateProfileInt (OLD, "OnDupeName", DEF_OnDupeName, szAppProFile);
  2011.   OnNameTooLong = 
  2012.      GetPrivateProfileInt (OLD, "OnNameTooLong", DEF_OnNameTooLong, szAppProFile);
  2013.   MaxFileNameLen = 
  2014.      GetPrivateProfileInt (OLD, "MaxFileNameLen", DEF_MaxFileNameLen, szAppProFile);
  2015.   MaxFileExtLen = 
  2016.      GetPrivateProfileInt (OLD, "MaxFileExtLen", DEF_MaxFileExtLen, szAppProFile);
  2017.   EnableExtensionConversion =
  2018.      GetPrivateProfileInt (OLD, "EnableExtensionConversion", DEF_EnableExtensionConversion, szAppProFile);
  2019.  
  2020.   GetPrivateProfileString (COMM, "GenSockDLL", DEF_GenSockDLL, GenSockDLL, MAXFILENAME+1,szAppProFile);
  2021.   if (!GenSockDLL)
  2022.     {
  2023.      WritePrivateProfileString (COMM, "GenSockDLL", "gensock.dll", szAppProFile);
  2024.      strcpy (GenSockDLL, "gensock.dll");
  2025.     }
  2026.   WriteWinvnProfile();
  2027.   WritePrivateProfileString (OLD, "Notice1", "**** The [winvn] section is no longer needed unless    ****", szAppProFile);
  2028.   WritePrivateProfileString (OLD, "Notice2", "**** you want compatibility with old versions of WinVn ****", szAppProFile);
  2029.  
  2030.   strlwr (szAppProFile);
  2031.   sprintf (buf, "WinVN has discovered your configuration file is from an older release."
  2032.                 "  Your configuration file %s has been updated.\nIf something doesn't work"
  2033.                 " as expected, please review the changes.", szAppProFile);
  2034.   MessageBox (hWndConf, buf, "WinVn Configuration", MB_OK);
  2035. }
  2036. @
  2037.  
  2038.  
  2039. 1.54
  2040. log
  2041. @new support for window cascading
  2042. @
  2043. text
  2044. @d3 1
  2045. a3 1
  2046.  * $Id: winvn.c 1.53 1994/09/16 00:44:49 jcooper Exp $
  2047. d5 3
  2048. d312 8
  2049. @
  2050.  
  2051.  
  2052. 1.53
  2053. log
  2054. @massive cleanup, etc for 92.6
  2055. @
  2056. text
  2057. @d3 1
  2058. a3 1
  2059.  * $Id: winvn.c 1.52 1994/08/24 18:40:15 mrr Exp $
  2060. d5 3
  2061. d451 3
  2062. a453 1
  2063.   CommDoc = &NetDoc;
  2064. d618 1
  2065. a619 1
  2066.   numStatusTexts = 0;
  2067. d621 1
  2068. a621 1
  2069.     codingStatusText[j] = NULL;
  2070. d752 2
  2071. a753 2
  2072.   ArtLineHeight = max (ArtLineHeight, (unsigned int) (tmFontInfo.tmExternalLeading + tmFontInfo.tmHeight));
  2073.   ArtCharWidth = max (ArtCharWidth, (unsigned int) (tmFontInfo.tmAveCharWidth));
  2074. @
  2075.  
  2076.  
  2077. 1.52
  2078. log
  2079. @authorization enables post/mail
  2080. @
  2081. text
  2082. @d3 1
  2083. a3 1
  2084.  * $Id: winvn.c 1.51 1994/08/24 17:59:26 jcooper Exp $
  2085. d5 3
  2086. d188 2
  2087. a189 1
  2088. #define STRICT
  2089. d191 3
  2090. a193 3
  2091. #include "windows.h"
  2092. #include "WVglob.h"
  2093. #include "WinVn.h"
  2094. d423 22
  2095. a444 20
  2096.   lpfnWinVnCommDlg =  MakeProcInstance ((FARPROC) WinVnCommDlg, hInstance);
  2097.   lpfnWinVnSaveArtDlg = MakeProcInstance ((FARPROC) WinVnSaveArtDlg, hInstance);
  2098.   lpfnWinVnSaveArtsDlg = MakeProcInstance ((FARPROC) WinVnSaveArtsDlg, hInstance);
  2099.   lpfnWinVnFindDlg = MakeProcInstance ((FARPROC) WinVnFindDlg, hInstance);
  2100.   lpfnWinVnGenericDlg = MakeProcInstance ((FARPROC) WinVnGenericDlg, hInstance);
  2101.   lpfnWinVnSubjectDlg = MakeProcInstance ((FARPROC) WinVnSubjectDlg, hInstance);
  2102.   lpfnWinVnAuthDlg = MakeProcInstance ((FARPROC) WinVnAuthDlg, hInstance);
  2103.   lpfnWinVnDoListDlg = MakeProcInstance ((FARPROC) WinVnDoListDlg, hInstance);
  2104.   lpfnWinVnPersonalInfoDlg = MakeProcInstance ((FARPROC) WinVnPersonalInfoDlg, hInstance);
  2105.   lpfnWinVnMiscDlg = MakeProcInstance ((FARPROC) WinVnMiscDlg, hInstance);
  2106.   lpfnWinVnAppearanceDlg = MakeProcInstance ((FARPROC)WinVnAppearanceDlg, hInstance);
  2107.   lpfnEditSubClass = MakeProcInstance((FARPROC) editIntercept, hInst);
  2108.   lpfnWinVnThresholdDlg = MakeProcInstance ((FARPROC)WinVnThresholdDlg, hInstance);
  2109.   lpfnWinVnLogOptDlg = MakeProcInstance ((FARPROC) WinVnLogOptDlg ,hInstance) ;
  2110.   lpfnWinVnDecodeArtsDlg = MakeProcInstance ((FARPROC) WinVnDecodeArtsDlg, hInstance);
  2111.   lpfnWinVnAttachDlg = MakeProcInstance ((FARPROC) WinVnAttachDlg, hInstance);
  2112.   lpfnWinVnEncodeDlg = MakeProcInstance ((FARPROC) WinVnEncodeDlg, hInstance);
  2113.   lpfnWinVnSigFileDlg = MakeProcInstance ((FARPROC) WinVnSigFileDlg, hInstance);
  2114.   lpfnWinVnExitDlg = MakeProcInstance ((FARPROC) WinVnExitDlg, hInstance);
  2115.   lpfnWinVnMailDlg = MakeProcInstance ((FARPROC) WinVnMailDlg, hInstance);
  2116. a603 1
  2117.   Attaching = FALSE;
  2118. a612 4
  2119. /*MailList = InitTextBlock (hWndConf);
  2120.   if (MailFileName[0] != '\0')
  2121.     ReadFileToTextBlock (hWndConf, MailList, MailFileName, ADD_PLAIN);
  2122. */
  2123. d959 45
  2124. d1151 2
  2125. d1158 1
  2126. d1161 38
  2127. a1198 2
  2128.   // test for existence of Comm section in ini file
  2129.   // if doesn't exist, we need to upgrade this user's INI file
  2130. a1239 2
  2131. //  GetPrivateProfileString (PREF, "MailListFile", DEF_MailFileName, MailFileName, MAXFILENAME+1,szAppProFile);
  2132.  
  2133. d1265 2
  2134. d1285 3
  2135. d1314 4
  2136. d1360 16
  2137. a1375 11
  2138.   MailList = InitTextBlock (hWndConf);
  2139.   for (j = 1;; j++)
  2140.   {
  2141.     sprintf (str, "Address%d", j);
  2142.     GetPrivateProfileString (MAIL_ADDRESSES, str, "", buf, MAILLEN, szAppProFile);
  2143.     if (!strcmp(buf, ""))
  2144.       break;
  2145.     AddLineToTextBlock (MailList, buf);
  2146.   }
  2147.   MailListOrigNum = (int)MailList->numLines;
  2148.   
  2149. d1405 1
  2150. d1446 1
  2151. a1454 1
  2152.   WritePrivateProfileInt    (CODING, "ExecuteDecodedFiles", ExecuteDecodedFiles, szAppProFile);
  2153. d1456 1
  2154. d1460 3
  2155. d1500 10
  2156. d1518 14
  2157. d1595 2
  2158. d1609 2
  2159. d1629 4
  2160. d1695 15
  2161. a1725 32
  2162.  
  2163. #if 0
  2164. /*--- function WriteMailRc -----------------------------------------
  2165.  *
  2166.  *    Write mail address list to file
  2167.  *    (JSC 2/1/94)
  2168.  */
  2169. void
  2170. WriteMailrc ()
  2171. {
  2172.   HANDLE hRetCode;
  2173.   TypMRRFile *MRRFile;
  2174.   register long j;
  2175.   int len;
  2176.   char mybuf[MAXINTERNALLINE];
  2177.   
  2178.   // overwrite previous file
  2179.   hRetCode = MRROpenFile (MailFileName, OF_CREATE, &MRRFile);
  2180.   if ((int) hRetCode < 0)
  2181.     {
  2182.       sprintf (str, "MRROpenFile on %s returned %d", MailFileName, hRetCode);
  2183.       MessageBox (hWndConf, str, "Write to mailrc file failed", MB_OK);
  2184.     }
  2185.   for (j = 0; j < (int)MailList->numLines; j++)
  2186.   {
  2187.       strcpy (mybuf, TextBlockLine (MailList, j));
  2188.       len = strlen (mybuf);
  2189.       MRRWriteLine (MRRFile, mybuf, len);
  2190.   }
  2191.   MRRCloseFile (MRRFile);
  2192. }
  2193. #endif
  2194. @
  2195.  
  2196.  
  2197. 1.51
  2198. log
  2199. @misc encoding/decoding changes
  2200. @
  2201. text
  2202. @d3 1
  2203. a3 1
  2204.  * $Id: winvn.c 1.50 1994/08/11 02:25:59 dumoulin Exp $
  2205. d5 3
  2206. d191 1
  2207. a191 1
  2208. #include "defaults.h"    // default profile settings
  2209. d270 1
  2210. a270 1
  2211.   SetUserMenus (hWnd, DISABLE);    // menus disabled until connection made
  2212. d306 1
  2213. a306 1
  2214.       Connect ();
  2215. d327 1
  2216. a327 1
  2217.   SetConnectMenuItem (hWndConf, DISABLE);    // connect item has reverse attributes
  2218. d332 2
  2219. a333 2
  2220.       
  2221.   if (MRRInitComm ())    /* Set up communications */
  2222. d336 1
  2223. a336 1
  2224.     SetConnectMenuItem (hWndConf, ENABLE);    // connect item has reverse attributes
  2225. d349 1
  2226. a349 1
  2227.     SetConnectMenuItem (hWndConf, ENABLE);    // connect item has reverse attributes
  2228. d443 1
  2229. a443 1
  2230.   Authorized = FALSE;
  2231. d566 1
  2232. a566 1
  2233. //  CheckView (hWndConf);        /* modify menu as necessary           */
  2234. d580 1
  2235. a580 1
  2236.   savingArtIndex = -1;        // reset to non-saving state
  2237. d587 1
  2238. a587 1
  2239.   uuMap[' ']=0;        // decode both quote and space to 0 in UU
  2240. d604 2
  2241. a605 2
  2242.     MessageBox (hWndConf, "Signatures disabled", "Signature File Failure", MB_OK);
  2243.     EnableSig = FALSE;
  2244. d622 4
  2245. a625 4
  2246.  *     Initialize global fonts and metrics
  2247.  *    Be sure to delete any existing font objects before replacing them
  2248.  *    Convert points representation to logical units for sizes
  2249.  *    JSC 1/10/93
  2250. d637 2
  2251. a638 2
  2252.   if (hListFont)        
  2253.     DeleteObject (hListFont);
  2254. d642 15
  2255. a656 15
  2256.     hListFont = CreateFont 
  2257.         (-MulDiv(ListFontSize, ScreenYPixels, 72),
  2258.         0,    /* width */
  2259.         0,    /* escapement */
  2260.         0,    /* orientation */
  2261.         strstr (ListFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  2262.         (BYTE) (strstr (ListFontStyle,"Italic") ? 1 : 0),
  2263.         0,    /* no underline */
  2264.         0,    /* no strikeout */
  2265.         0,
  2266.         OUT_DEFAULT_PRECIS,
  2267.         CLIP_DEFAULT_PRECIS,
  2268.         0,    /* no PROOF_QUALITY */
  2269.         0,
  2270.         ListFontFace);
  2271. d659 1
  2272. a659 1
  2273.     hListFont = GetStockObject (OEM_FIXED_FONT);
  2274. d686 1
  2275. a686 1
  2276.   if (hFontArtNormal)        
  2277. d688 2
  2278. a689 2
  2279.     DeleteObject (hFontArtNormal);
  2280.     DeleteObject (hFontArtQuote);
  2281. d692 43
  2282. a734 43
  2283.     {
  2284.         hFontArtNormal = CreateFont (
  2285.         -MulDiv(ArticleFontSize, ScreenYPixels, 72),
  2286.         0,    /* width */
  2287.         0,    /* escapement */
  2288.         0,    /* orientation */
  2289.         strstr (ArticleFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  2290.         (BYTE) (strstr (ArticleFontStyle,"Italic") ? 1 : 0),
  2291.         0,    /* no underline */
  2292.         0,    /* no strikeout */
  2293.         0,
  2294.         OUT_DEFAULT_PRECIS,
  2295.         CLIP_DEFAULT_PRECIS,
  2296.         0,    /* no PROOF_QUALITY */
  2297.         0,
  2298.         ArticleFontFace);
  2299.  
  2300.       hFontArtQuote = CreateFont (
  2301.         -MulDiv(ArticleFontSize, ScreenYPixels, 72),
  2302.         0,    /* width */
  2303.         0,    /* escapement */
  2304.         0,    /* orientation */
  2305.         strstr (ArticleFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  2306.         (BYTE) (strstr (ArticleFontStyle,"Italic") ? 0 : 1),  // opposite to above italics
  2307.         0,    /* no underline */
  2308.         0,    /* no strikeout */
  2309.         0,
  2310.         OUT_DEFAULT_PRECIS,
  2311.         CLIP_DEFAULT_PRECIS,
  2312.         0,    /* no PROOF_QUALITY */
  2313.         0,
  2314.         ArticleFontFace);
  2315.     }
  2316.     else if (ArticleFixedFont)
  2317.     {
  2318.         hFontArtNormal  = GetStockObject (ANSI_FIXED_FONT);
  2319.         hFontArtQuote = GetStockObject (ANSI_FIXED_FONT);
  2320.     }
  2321.     else
  2322.     {
  2323.         hFontArtNormal = hListFont;
  2324.         hFontArtQuote = hListFont;
  2325.     }
  2326. d765 2
  2327. a766 2
  2328.   if (hStatusFont)        
  2329.     DeleteObject (hStatusFont);
  2330. d769 19
  2331. a787 19
  2332.     {
  2333.         hStatusFont = CreateFont 
  2334.         (-MulDiv(StatusFontSize, ScreenYPixels, 72),
  2335.         0,    /* width */
  2336.         0,    /* escapement */
  2337.         0,    /* orientation */
  2338.         strstr (StatusFontStyle,"Bold") ? FW_BOLD : FW_MEDIUM,
  2339.         (BYTE) (strstr (StatusFontStyle,"Italic") ? 1 : 0),
  2340.         0,    /* no underline */
  2341.         0,    /* no strikeout */
  2342.         0,
  2343.         OUT_DEFAULT_PRECIS,
  2344.         CLIP_DEFAULT_PRECIS,
  2345.         0,    /* no PROOF_QUALITY */
  2346.         0,
  2347.         StatusFontFace);
  2348.     }
  2349.     else
  2350.         hStatusFont = GetStockObject (OEM_FIXED_FONT);
  2351. d808 1
  2352. a808 1
  2353.   if (hFontPrint)        
  2354. d823 14
  2355. a836 14
  2356.                 -MulDiv(PrintFontSize, PrinterYPixels, 72),
  2357.                 0,     /* width */
  2358.             0,    /* escapement */
  2359.             0,    /* orientation */
  2360.             FW_MEDIUM,
  2361.             0,    /* no italics */
  2362.             0,    /* no underline */
  2363.             0,    /* no strikeout */
  2364.             0,
  2365.             OUT_DEFAULT_PRECIS,     
  2366.             CLIP_DEFAULT_PRECIS,
  2367.             0,    /* no PROOF_QUALITY */
  2368.             0,
  2369.             PrintFontFace);
  2370. d839 14
  2371. a852 14
  2372.             -MulDiv(PrintFontSize, PrinterYPixels, 72),
  2373.             0,     /* width */
  2374.             0,    /* escapement */
  2375.             0,    /* orientation */
  2376.             FW_BOLD,
  2377.             0,    /* no italics */
  2378.             0,    /* no underline */
  2379.             0,    /* no strikeout */
  2380.             0,
  2381.             OUT_DEFAULT_PRECIS,
  2382.             CLIP_DEFAULT_PRECIS,
  2383.             0,    /* no PROOF_QUALITY */
  2384.             0,
  2385.             PrintFontFace);
  2386. d855 30
  2387. a884 30
  2388.             -MulDiv((int)(0.9*PrintFontSize), PrinterYPixels, 72),
  2389.             0,     /* width */
  2390.             0,    /* escapement */
  2391.             0,    /* orientation */
  2392.             FW_LIGHT,
  2393.             1,    /* italics */
  2394.             0,    /* no underline */
  2395.             0,    /* no strikeout */
  2396.             0,
  2397.             OUT_DEFAULT_PRECIS,
  2398.             CLIP_DEFAULT_PRECIS,
  2399.             0,    /* no PROOF_QUALITY */
  2400.             0,
  2401.             PrintFontFace);
  2402.  
  2403.         hFontPrintS = CreateFont (
  2404.             -MulDiv((int)(1.5*PrintFontSize), PrinterYPixels, 72),
  2405.             0,     /* width */
  2406.             0,    /* escapement */
  2407.             0,    /* orientation */
  2408.             FW_EXTRABOLD,       
  2409.             0,    /* no italics */
  2410.             1,    /* underline */
  2411.             0,    /* no strikeout */
  2412.             0,
  2413.             OUT_DEFAULT_PRECIS,
  2414.             CLIP_DEFAULT_PRECIS,
  2415.             0,    /* no PROOF_QUALITY */
  2416.             0,
  2417.             PrintFontFace);
  2418. d889 15
  2419. a903 15
  2420.                  -MulDiv(8, PrinterYPixels, 72),
  2421.     //        40,    /* default Font Size */
  2422.             0,     /* width */
  2423.             0,    /* escapement */
  2424.             0,    /* orientation */
  2425.             FW_MEDIUM,
  2426.             0,    /* no italics */
  2427.             0,    /* no underline */
  2428.             0,    /* no strikeout */
  2429.             0,
  2430.             OUT_DEFAULT_PRECIS,
  2431.             CLIP_DEFAULT_PRECIS,
  2432.             0,    /* no PROOF_QUALITY */
  2433.             0,
  2434.             0);    /* Default Font Face */
  2435. d906 15
  2436. a920 15
  2437.                  -MulDiv(8, PrinterYPixels, 72),
  2438.     //        40,    /* default font size */
  2439.             0,     /* width */
  2440.             0,    /* escapement */
  2441.             0,    /* orientation */
  2442.             FW_BOLD,
  2443.             0,    /* no italics */
  2444.             0,    /* no underline */
  2445.             0,    /* no strikeout */
  2446.             0,
  2447.             OUT_DEFAULT_PRECIS,
  2448.             CLIP_DEFAULT_PRECIS,
  2449.             0,    /* no PROOF_QUALITY */
  2450.             0,
  2451.             0);    /* default font face */
  2452. d923 15
  2453. a937 15
  2454.                -MulDiv((int)(0.9 * 8), PrinterYPixels, 72),
  2455.     //        36,    /* default font size */
  2456.             0,     /* width */
  2457.             0,    /* escapement */
  2458.             0,    /* orientation */
  2459.             FW_LIGHT,
  2460.             1,    /* italics */
  2461.             0,    /* no underline */
  2462.             0,    /* no strikeout */
  2463.             0,
  2464.             OUT_DEFAULT_PRECIS,
  2465.             CLIP_DEFAULT_PRECIS,
  2466.             0,    /* no PROOF_QUALITY */
  2467.             0,
  2468.             0);    /* default font face */
  2469. d940 16
  2470. a955 16
  2471.                -MulDiv(8, PrinterYPixels, 72),
  2472.     //        60,
  2473.             0,     /* width */
  2474.             0,    /* escapement */
  2475.             0,    /* orientation */
  2476.             FW_EXTRABOLD,
  2477.             0,    /* no italics */
  2478.             1,    /* underline */
  2479.             0,    /* no strikeout */
  2480.             0,
  2481.             OUT_DEFAULT_PRECIS,
  2482.             CLIP_DEFAULT_PRECIS,
  2483.             0,    /* no PROOF_QUALITY */
  2484.             0,
  2485.             "Arial");
  2486.     }
  2487. d1116 2
  2488. a1117 2
  2489.       UpdateWinvnProfile();
  2490.       return;
  2491. d1140 2
  2492. d1274 1
  2493. a1274 1
  2494.         break;
  2495. @
  2496.  
  2497.  
  2498. 1.50
  2499. log
  2500. @enabled STRICT compile and cleaned up parameter casting
  2501. @
  2502. text
  2503. @d3 1
  2504. a3 1
  2505.  * $Id: winvn.c 1.49 1994/08/11 00:09:17 jcooper Exp dumoulin $
  2506. d5 3
  2507. d1205 2
  2508. d1361 1
  2509. d1482 2
  2510. @
  2511.  
  2512.  
  2513. 1.49
  2514. log
  2515. @Enhancements to Mime and article encoding/encoding
  2516. @
  2517. text
  2518. @d3 1
  2519. a3 1
  2520.  * $Id: winvn.c 1.48 1994/08/04 05:51:54 dumoulin Exp $
  2521. d5 3
  2522. d179 1
  2523. d271 1
  2524. a271 1
  2525.      if (!DialogBox (hInst, "WinVnComm", hWndConf, lpfnWinVnCommDlg))
  2526. d278 1
  2527. a278 1
  2528.      if (!DialogBox (hInst, "WinVnPersonal", hWndConf, lpfnWinVnPersonalInfoDlg))
  2529. d337 1
  2530. a337 1
  2531.   idTimer = SetTimer (hWndConf, ID_TIMER ,1000, (FARPROC) NULL);
  2532. d373 1
  2533. a373 1
  2534. WinVnInit (HANDLE hInstance, LPSTR lpCmdLine )
  2535. d413 11
  2536. a423 11
  2537.   lpfnWinVnCommDlg = MakeProcInstance (WinVnCommDlg, hInstance);
  2538.   lpfnWinVnSaveArtDlg = MakeProcInstance (WinVnSaveArtDlg, hInstance);
  2539.   lpfnWinVnSaveArtsDlg = MakeProcInstance (WinVnSaveArtsDlg, hInstance);
  2540.   lpfnWinVnFindDlg = MakeProcInstance (WinVnFindDlg, hInstance);
  2541.   lpfnWinVnGenericDlg = MakeProcInstance (WinVnGenericDlg, hInstance);
  2542.   lpfnWinVnSubjectDlg = MakeProcInstance (WinVnSubjectDlg, hInstance);
  2543.   lpfnWinVnAuthDlg = MakeProcInstance (WinVnAuthDlg, hInstance);
  2544.   lpfnWinVnDoListDlg = MakeProcInstance (WinVnDoListDlg, hInstance);
  2545.   lpfnWinVnPersonalInfoDlg = MakeProcInstance (WinVnPersonalInfoDlg, hInstance);
  2546.   lpfnWinVnMiscDlg = MakeProcInstance (WinVnMiscDlg, hInstance);
  2547.   lpfnWinVnAppearanceDlg = MakeProcInstance (WinVnAppearanceDlg, hInstance);
  2548. d425 8
  2549. a432 8
  2550.   lpfnWinVnThresholdDlg = MakeProcInstance (WinVnThresholdDlg, hInstance);
  2551.   lpfnWinVnLogOptDlg = MakeProcInstance (WinVnLogOptDlg ,hInstance) ;
  2552.   lpfnWinVnDecodeArtsDlg = MakeProcInstance (WinVnDecodeArtsDlg, hInstance);
  2553.   lpfnWinVnAttachDlg = MakeProcInstance (WinVnAttachDlg, hInstance);
  2554.   lpfnWinVnEncodeDlg = MakeProcInstance (WinVnEncodeDlg, hInstance);
  2555.   lpfnWinVnSigFileDlg = MakeProcInstance (WinVnSigFileDlg, hInstance);
  2556.   lpfnWinVnExitDlg = MakeProcInstance (WinVnExitDlg, hInstance);
  2557.   lpfnWinVnMailDlg = MakeProcInstance (WinVnMailDlg, hInstance);
  2558. d449 1
  2559. a449 1
  2560.   pWndClass->hbrBa#kground = GetStockObject (WHITE_BRUSH);
  2561. @
  2562.  
  2563.  
  2564. 1.48
  2565. log
  2566. @Fixed problem with long mail addresses getting truncated to 32 chars
  2567. @
  2568. text
  2569. @d3 1
  2570. a3 1
  2571.  * $Id: winvn.c 1.47 1994/08/03 00:35:20 dumoulin Exp dumoulin $
  2572. d5 3
  2573. d1196 2
  2574. d1203 4
  2575. a1206 1
  2576.  
  2577. d1342 1
  2578. d1346 1
  2579. d1348 1
  2580. d1351 1
  2581. d1353 3
  2582. a1356 1
  2583.   WritePrivateProfileString (CODING, "EncodingType", EncodingType, szAppProFile);
  2584. a1357 2
  2585.   WritePrivateProfileInt    (CODING, "AttachInNewArt", AttachInNewArt, szAppProFile);
  2586.   WritePrivateProfileInt    (CODING, "ExecuteDecodedFiles", ExecuteDecodedFiles, szAppProFile);
  2587. d1470 2
  2588. d1474 3
  2589. @
  2590.  
  2591.  
  2592. 1.47
  2593. log
  2594. @Fixed bug upon exit and startup for folks that don't have
  2595. any printers.
  2596. @
  2597. text
  2598. @d3 1
  2599. a3 1
  2600.  * $Id: winvn.c 1.46 1994/08/02 05:00:16 dumoulin Exp dumoulin $
  2601. d5 4
  2602. d1250 1
  2603. a1250 1
  2604.     GetPrivateProfileString (MAIL_ADDRESSES, str, "", buf, 32, szAppProFile);
  2605. @
  2606.  
  2607.  
  2608. 1.46
  2609. log
  2610. @change HANDLE to HINSTANCE for better NT compatiblity
  2611. @
  2612. text
  2613. @d3 1
  2614. a3 1
  2615.  * $Id: winvn.c 1.45 1994/07/25 22:41:22 pearse_w_r Exp dumoulin $
  2616. d5 3
  2617. d396 1
  2618. a396 1
  2619.   InitPrintFonts();  
  2620. @
  2621.  
  2622.  
  2623. 1.45
  2624. log
  2625. @ShowUnreadOnly option
  2626. @
  2627. text
  2628. @d3 1
  2629. a3 1
  2630.  * $Id: winvn.c 1.44 1994/07/25 18:51:48 jcooper Exp pearse_w_r $
  2631. d5 3
  2632. d195 2
  2633. a196 2
  2634.      HANDLE hInstance;
  2635.      HANDLE hPrevInstance;
  2636. @
  2637.  
  2638.  
  2639. 1.44
  2640. log
  2641. @execution of decoded files
  2642. @
  2643. text
  2644. @d3 1
  2645. a3 1
  2646.  * $Id: winvn.c 1.43 1994/06/30 16:33:35 dumoulin Exp $
  2647. d5 3
  2648. d1163 2
  2649. d1321 1
  2650. d1438 2
  2651. @
  2652.  
  2653.  
  2654. 1.43
  2655. log
  2656. @Fix a problem with freeing printing fonts with an uninitialized variable
  2657. @
  2658. text
  2659. @d3 1
  2660. a3 1
  2661.  * $Id: winvn.c 1.42 1994/06/23 23:10:40 dumoulin Exp dumoulin $
  2662. d5 3
  2663. d1187 2
  2664. d1329 1
  2665. d1445 3
  2666. @
  2667.  
  2668.  
  2669. 1.42
  2670. log
  2671. @Changed code to not delete hardware device context for Printer device
  2672. @
  2673. text
  2674. @d3 1
  2675. a3 1
  2676.  * $Id: winvn.c 1.41 1994/06/17 09:08:49 dumoulin Exp dumoulin $
  2677. d5 3
  2678. d379 1
  2679. a379 3
  2680.   hDC = GetPrinterDC (NULL);
  2681.   PrinterYPixels = GetDeviceCaps(hDC, LOGPIXELSY);
  2682. //  DeleteDC (hDC);
  2683. d777 19
  2684. a795 13
  2685. {
  2686.     if (hFontPrint)        
  2687.     {
  2688.         DeleteObject (hFontPrint);
  2689.         DeleteObject (hFontPrintB);
  2690.         DeleteObject (hFontPrintI);
  2691.         DeleteObject (hFontPrintS);
  2692.     }
  2693.     if (PrintFontSize)
  2694.     {
  2695.         hFontPrint = CreateFont (
  2696.             -MulDiv(PrintFontSize, PrinterYPixels, 72),
  2697.             0,     /* width */
  2698. d809 1
  2699. a809 1
  2700.         hFontPrintB = CreateFont (
  2701. d825 1
  2702. a825 1
  2703.         hFontPrintI = CreateFont (
  2704. d856 6
  2705. a861 5
  2706.     }
  2707.     else
  2708.     {
  2709.         hFontPrint = CreateFont (
  2710.             40,    /* default Font Size */
  2711. d876 3
  2712. a878 2
  2713.         hFontPrintB = CreateFont (
  2714.             40,    /* default font size */
  2715. d893 3
  2716. a895 2
  2717.         hFontPrintI = CreateFont (
  2718.             36,    /* default font size */
  2719. d910 3
  2720. a912 2
  2721.         hFontPrintS = CreateFont (
  2722.             60,
  2723. @
  2724.  
  2725.  
  2726. 1.41
  2727. log
  2728. @Attempts to fix the Unable to Initialize Document printing bug
  2729. @
  2730. text
  2731. @d3 1
  2732. a3 1
  2733.  * $Id: winvn.c 1.40 1994/06/11 00:46:47 dumoulin Exp dumoulin $
  2734. d5 3
  2735. d378 2
  2736. a379 2
  2737. //  DeleteDC (hDC);   // JD 6/17/94
  2738.   
  2739. @
  2740.  
  2741.  
  2742. 1.40
  2743. log
  2744. @Fix defaults for GenSock.DLL and prompt if no username specified
  2745. @
  2746. text
  2747. @d3 1
  2748. a3 1
  2749.  * $Id: winvn.c 1.39 1994/06/06 22:06:13 gardnerd Exp dumoulin $
  2750. d5 3
  2751. d373 1
  2752. a373 1
  2753.   hDC = GetPrinterDC ();
  2754. d375 1
  2755. a375 1
  2756.   DeleteDC (hDC);
  2757. @
  2758.  
  2759.  
  2760. 1.39
  2761. log
  2762. @horizontal scrolling support
  2763. @
  2764. text
  2765. @d3 1
  2766. a3 1
  2767.  * $Id: winvn.c 1.38 1994/05/27 01:29:29 rushing Exp $
  2768. d5 3
  2769. d241 7
  2770. d1265 1
  2771. d1483 6
  2772. @
  2773.  
  2774.  
  2775. 1.38
  2776. log
  2777. @unnecessary winundoc.h
  2778. @
  2779. text
  2780. @d3 1
  2781. a3 1
  2782.  * $Id: winvn.c 1.37 1994/05/26 22:02:38 jglasser Exp rushing $
  2783. d5 3
  2784. d215 1
  2785. a215 1
  2786.              WS_OVERLAPPEDWINDOW | WS_VSCROLL,
  2787. @
  2788.  
  2789.  
  2790. 1.37
  2791. log
  2792. @warnings
  2793. @
  2794. text
  2795. @d3 1
  2796. a3 1
  2797.  * $Id: winvn.c 1.36 1994/05/23 19:51:51 rushing Exp rushing $
  2798. d5 3
  2799. a145 1
  2800. #include "winundoc.h"
  2801. @
  2802.  
  2803.  
  2804. 1.36
  2805. log
  2806. @NNTPPort becomes NNTPService, and it's a string.
  2807. @
  2808. text
  2809. @d3 1
  2810. a3 1
  2811.  * $Id: winvn.c 1.35 1994/05/23 18:37:00 jcooper Exp rushing $
  2812. d5 3
  2813. d597 1
  2814. a597 1
  2815.         strstr (ListFontStyle,"Italic") ? 1 : 0,
  2816. d648 1
  2817. a648 1
  2818.         strstr (ArticleFontStyle,"Italic") ? 1 : 0,
  2819. d664 1
  2820. a664 1
  2821.         strstr (ArticleFontStyle,"Italic") ? 0 : 1,  // opposite to above italics
  2822. d695 2
  2823. a696 2
  2824.   ArtLineHeight = max (ArtLineHeight, tmFontInfo.tmExternalLeading + tmFontInfo.tmHeight);
  2825.   ArtCharWidth = max (ArtCharWidth, tmFontInfo.tmAveCharWidth);
  2826. d725 1
  2827. a725 1
  2828.         strstr (StatusFontStyle,"Italic") ? 1 : 0,
  2829. d1140 1
  2830. a1140 1
  2831.       GetPrivateProfileUInt (CODING, "ArticleSplitLength", DEF_ArticleSplitLength, szAppProFile);
  2832. d1407 1
  2833. a1407 1
  2834.       GetPrivateProfileUInt (OLD, "ArticleSplitLength", DEF_ArticleSplitLength, szAppProFile);
  2835. @
  2836.  
  2837.  
  2838. 1.35
  2839. log
  2840. @new attach code, session [dis]connect
  2841. @
  2842. text
  2843. @d3 1
  2844. a3 1
  2845.  * $Id: winvn.c 1.34 1994/05/02 19:51:12 rushing Exp rushing $
  2846. d5 3
  2847. d296 1
  2848. d1065 1
  2849. a1065 2
  2850.   NNTPPort =
  2851.      GetPrivateProfileInt (COMM, "NNTPPort", DEF_NNTPPort, szAppProFile);
  2852. d1243 1
  2853. a1243 1
  2854.   WritePrivateProfileInt    (COMM, "NNTPPort", NNTPPort, szAppProFile);
  2855. d1343 1
  2856. a1343 2
  2857.   NNTPPort =
  2858.      GetPrivateProfileInt (OLD, "NNTPPort", DEF_NNTPPort, szAppProFile);
  2859. @
  2860.  
  2861.  
  2862. 1.34
  2863. log
  2864. @more changes from jg
  2865. @
  2866. text
  2867. @d3 1
  2868. a3 1
  2869.  * $Id: winvn.c 1.33 1994/05/02 19:45:42 rushing Exp rushing $
  2870. d5 3
  2871. d218 1
  2872. a227 5
  2873.   /* Set up communications--serial or IP.                           */
  2874.  
  2875.   if (MRRInitComm ())
  2876.     PostQuitMessage(0);
  2877.  
  2878. d243 6
  2879. a248 1
  2880.   Initializing = INIT_ESTAB_CONN;
  2881. d250 1
  2882. d259 43
  2883. a509 9
  2884.   /* Set up the timer which will wake us up every so often
  2885.    * so we can check to see if new characters have arrived from
  2886.    * the server.
  2887.    */
  2888.   idTimer = SetTimer (hWndConf, ID_TIMER ,1000, (FARPROC) NULL);
  2889.  
  2890.   if (!idTimer)
  2891.     MessageBox (hWndConf, "Couldn't create timer!", "WinVN", MB_OK | MB_ICONASTERISK);
  2892.  
  2893. a526 1
  2894.   EncodingType = CODE_UU;
  2895. d1097 2
  2896. d1131 2
  2897. a1132 3
  2898. //ReviewAttach = 
  2899. //   GetPrivateProfileInt (CODING, "ReviewAttach", DEF_ReviewAttach, szAppProFile);
  2900.   ReviewAttach = 1;
  2901. d1140 2
  2902. d1143 4
  2903. d1259 1
  2904. d1276 1
  2905. a1276 1
  2906. //WritePrivateProfileString (CODING, "ReviewAttach", ReviewAttach, szAppProFile);
  2907. d1282 3
  2908. d1366 2
  2909. a1367 2
  2910.   DoList = 
  2911.      GetPrivateProfileInt (OLD, "DoList", DEF_DoList,szAppProFile);
  2912. d1394 7
  2913. a1400 3
  2914. //ReviewAttach = 
  2915. //   GetPrivateProfileInt (OLD, "ReviewAttach", DEF_ReviewAttach, szAppProFile);
  2916.   ReviewAttach = 1;
  2917. @
  2918.  
  2919.  
  2920. 1.33
  2921. log
  2922. @redoing JD's print font size change
  2923. @
  2924. text
  2925. @d3 1
  2926. a3 1
  2927.  * $Id: winvn.c 1.32 1994/05/02 19:44:04 rushing Exp rushing $
  2928. d5 3
  2929. d1225 1
  2930. @
  2931.  
  2932.  
  2933. 1.32
  2934. log
  2935. @changes from jody glasser
  2936. @
  2937. text
  2938. @d3 1
  2939. a3 1
  2940.  * $Id: winvn.c 1.31 1994/04/22 05:02:23 dumoulin Exp rushing $
  2941. d5 3
  2942. d1381 1
  2943. a1381 1
  2944.      PrintFontSize = 12;
  2945. @
  2946.  
  2947.  
  2948. 1.31
  2949. log
  2950. @Fix font size problem
  2951. @
  2952. text
  2953. @d3 1
  2954. a3 1
  2955.  * $Id: winvn.c 1.30 1994/04/22 04:55:02 dumoulin Exp dumoulin $
  2956. d5 3
  2957. d1076 3
  2958. @
  2959.  
  2960.  
  2961. 1.30
  2962. log
  2963. @Fix font conversion problem when converting older winvn.ini files
  2964. @
  2965. text
  2966. @d3 1
  2967. a3 1
  2968.  * $Id: winvn.c 1.29 1994/04/19 10:18:52 dumoulin Exp dumoulin $
  2969. d5 3
  2970. d1369 2
  2971. d1372 1
  2972. a1372 3
  2973.      PrintFontSize = 10;
  2974.   if (StatusFontSize && (StatusFontSize == 0 || StatusFontSize > 16))
  2975.      StatusFontSize = 10;
  2976. a1373 2
  2977. //  ArticleFixedFont = 
  2978. //     GetPrivateProfileInt (OLD, "ArticleFixedFont", FALSE, szAppProFile);
  2979. @
  2980.  
  2981.  
  2982. 1.29
  2983. log
  2984. @Updated converter for old to new INI files
  2985. @
  2986. text
  2987. @d3 1
  2988. a3 1
  2989.  * $Id: winvn.c 1.28 1994/04/18 20:49:44 rushing Exp dumoulin $
  2990. d5 3
  2991. d1357 14
  2992. @
  2993.  
  2994.  
  2995. 1.28
  2996. log
  2997. @check MailList for NULL on write of newsrc
  2998. @
  2999. text
  3000. @d3 1
  3001. a3 1
  3002.  * $Id: winvn.c 1.27 1994/03/01 19:10:19 rushing Exp rushing $
  3003. d5 3
  3004. d1260 1
  3005. a1260 1
  3006.   char buf[MAXINTERNALLINE];
  3007. d1383 3
  3008. a1385 1
  3009.   sprintf (buf, "Your configuration file %s has been updated.\nPlease review the changes.", szAppProFile);
  3010. @
  3011.  
  3012.  
  3013. 1.27
  3014. log
  3015. @ThreadFullSubject option added
  3016. @
  3017. text
  3018. @d3 1
  3019. a3 1
  3020.  * $Id: winvn.c 1.26 1994/02/24 21:24:47 jcoop Exp rushing $
  3021. d5 3
  3022. d1203 1
  3023. d1239 7
  3024. a1245 5
  3025.   for (j = 0; j < max(MailListOrigNum, (int)MailList->numLines); j++)
  3026.   {
  3027.     sprintf (str, "Address%d", j+1);
  3028.     WritePrivateProfileString (MAIL_ADDRESSES, str, 
  3029.        (j >= (int)MailList->numLines)?"":TextBlockLine(MailList, j), szAppProFile);
  3030. @
  3031.  
  3032.  
  3033. 1.26
  3034. log
  3035. @jcoop changes
  3036. @
  3037. text
  3038. @d3 1
  3039. a3 1
  3040.  * $Id: winvn.c 1.25 1994/02/16 21:58:56 rushing Exp $
  3041. d5 3
  3042. d1058 3
  3043. @
  3044.  
  3045.  
  3046. 1.25
  3047. log
  3048. @call to profilestring was a little hosed for .sig file
  3049. @
  3050. text
  3051. @d3 1
  3052. a3 1
  3053.  * $Id: winvn.c 1.24 1994/02/16 20:59:17 rushing Exp rushing $
  3054. d5 3
  3055. d140 1
  3056. a140 1
  3057. {
  3058. d198 1
  3059. a198 1
  3060.        PostQuitMessage(0);
  3061. d274 2
  3062. d278 1
  3063. a278 1
  3064.   ReleaseDC (hWndConf, hDC);
  3065. d294 1
  3066. d308 1
  3067. d435 1
  3068. a435 1
  3069.  
  3070. d464 12
  3071. a475 1
  3072.   EncodingType = ENCODE_UU;
  3073. d486 1
  3074. a486 1
  3075.      }
  3076. d488 4
  3077. d553 1
  3078. a553 1
  3079.   TopSpace = tmFontInfo.tmExternalLeading;
  3080. d556 1
  3081. a556 1
  3082.   SideSpace = tmFontInfo.tmAveCharWidth / 2;
  3083. d565 1
  3084. a565 1
  3085.  
  3086. d622 10
  3087. d973 1
  3088. d980 1
  3089. d993 1
  3090. d998 1
  3091. a998 1
  3092.   GetPrivateProfileString (COMM, "SMTPHost", "", SMTPHost, MAXNNTPSIZE, szAppProFile);
  3093. d1004 5
  3094. d1020 1
  3095. d1024 2
  3096. a1038 4
  3097.   MailDemandLogon = 
  3098.      GetPrivateProfileInt (PREF, "MailDemandLogon", DEF_MailDemandLogon, szAppProFile);
  3099.   MailForceType = 
  3100.      GetPrivateProfileInt (PREF, "MailForceType", DEF_MailForceType, szAppProFile);
  3101. d1045 4
  3102. d1056 1
  3103. d1113 11
  3104. d1153 2
  3105. d1158 1
  3106. d1176 1
  3107. d1189 2
  3108. d1195 1
  3109. d1228 7
  3110. d1251 1
  3111. d1256 1
  3112. a1256 1
  3113.   GetPrivateProfileString (OLD, "SMTPHost", "", SMTPHost, MAXNNTPSIZE, szAppProFile);
  3114. d1261 7
  3115. a1267 3
  3116.   
  3117.   GetPrivateProfileString (AUTH, "NNTPUserName", DEF_NNTPUserName, NNTPUserName, MAXNNTPSIZE, szAppProFile);
  3118.   GetPrivateProfileString (AUTH, "NNTPPassword", DEF_NNTPPassword, NNTPPasswordEncrypted, 2*MAXNNTPSIZE, szAppProFile);
  3119. d1271 2
  3120. a1272 1
  3121.   GetPrivateProfileString (OLD, "SignatureFile", "", DEF_SignatureFile, MAXFILENAME+1,szAppProFile);
  3122. a1288 4
  3123.   MailDemandLogon = 
  3124.      GetPrivateProfileInt (OLD, "MailDemandLogon", DEF_MailDemandLogon, szAppProFile);
  3125.   MailForceType = 
  3126.      GetPrivateProfileInt (OLD, "MailForceType", DEF_MailForceType, szAppProFile);
  3127. d1295 4
  3128. d1306 1
  3129. d1371 32
  3130. @
  3131.  
  3132.  
  3133. 1.24
  3134. log
  3135. @Added .ini param to force use of XHDR over XOVER
  3136. @
  3137. text
  3138. @d3 1
  3139. a3 1
  3140.  * $Id: winvn.c 1.23 1994/02/09 01:25:15 cnolan Exp rushing $
  3141. d5 3
  3142. d979 1
  3143. a979 1
  3144.   GetPrivateProfileString (PREF, "SignatureFile", "", DEF_SignatureFile, MAXFILENAME+1,szAppProFile);
  3145. @
  3146.  
  3147.  
  3148. 1.23
  3149. log
  3150. @cnolan 90.2 changes
  3151. @
  3152. text
  3153. @d3 1
  3154. a3 1
  3155.  * $Id: winvn.c 1.22 1994/02/09 01:10:07 rushing Exp $
  3156. d5 3
  3157. d971 3
  3158. d975 1
  3159. a975 1
  3160.      GetPrivateProfileInt (PREF, "EnableThreading", DEF_EnableThreading, szAppProFile);
  3161. @
  3162.  
  3163.  
  3164. 1.22
  3165. log
  3166. @PREF->COMM for GenSockDLL profile string
  3167. @
  3168. text
  3169. @d3 1
  3170. a3 1
  3171.  * $Id: winvn.c 1.21 1994/02/04 02:18:13 rushing Exp rushing $
  3172. d5 3
  3173. d181 1
  3174. a181 1
  3175.   SetClassWord (hWnd, GCW_HBRBACKGROUND, hListBackgroundBrush);
  3176. @
  3177.  
  3178.  
  3179. 1.21
  3180. log
  3181. @added GenSockDLL .ini parameter
  3182. @
  3183. text
  3184. @d3 1
  3185. a3 1
  3186.  * $Id: winvn.c 1.20 1994/01/24 19:34:38 jcoop Exp rushing $
  3187. d5 3
  3188. d963 1
  3189. a963 1
  3190.   GetPrivateProfileString (PREF, "GenSockDLL", DEF_GenSockDLL, GenSockDLL, MAXFILENAME+1,szAppProFile);
  3191. @
  3192.  
  3193.  
  3194. 1.20
  3195. log
  3196. @per email
  3197. @
  3198. text
  3199. @d3 1
  3200. a3 1
  3201.  * $Id: winvn.c 1.19 1994/01/24 17:39:47 jcoop Exp jcoop $
  3202. d5 3
  3203. d959 2
  3204. @
  3205.  
  3206.  
  3207. 1.19
  3208. log
  3209. @90.2 changes
  3210. @
  3211. text
  3212. @d3 1
  3213. a3 1
  3214.  * $Id: winvn.c 1.18 1994/01/17 21:56:15 jcoop Exp $
  3215. d5 3
  3216. d179 2
  3217. a180 1
  3218.      DialogBox (hInst, "WinVnComm", hWndConf, lpfnWinVnCommDlg);
  3219. d1274 1
  3220. a1274 1
  3221. }@
  3222.  
  3223.  
  3224. 1.18
  3225. log
  3226. @New font/color and INI file routines.  Sig file and en/decoding inits
  3227. @
  3228. text
  3229. @d3 1
  3230. a3 1
  3231.  * $Id: winvn.c 1.18 1994/01/17 21:42:20 jcoop Exp $
  3232. d5 3
  3233. d91 1
  3234. a91 1
  3235.  
  3236. d174 4
  3237. d412 9
  3238. d937 3
  3239. a939 3
  3240.   GetPrivateProfileString (PERSONAL, "UserName", "", UserName, MAILLEN,szAppProFile);
  3241.   GetPrivateProfileString (PERSONAL, "MailAddress", "", MailAddress, MAILLEN,szAppProFile);
  3242.   GetPrivateProfileString (PERSONAL, "Organization", "", Organization, MAILLEN,szAppProFile);
  3243. d942 3
  3244. a944 3
  3245.      GetPrivateProfileInt (COMM, "UseSocket", 1, szAppProFile);
  3246.   GetPrivateProfileString (COMM, "NNTPHost", "news_host_here", NNTPHost, MAXNNTPSIZE,szAppProFile);
  3247.   GetPrivateProfileString (COMM, "SMTPHost", "", SMTPHost, MAXNNTPSIZE,szAppProFile);
  3248. d946 1
  3249. a946 1
  3250.      GetPrivateProfileInt (COMM, "NNTPPort", 119 ,szAppProFile);
  3251. d948 1
  3252. a948 1
  3253.      GetPrivateProfileInt (COMM, "DebugComm", FALSE, szAppProFile);
  3254. d950 2
  3255. a951 2
  3256.   GetPrivateProfileString (AUTH, "NNTPUserName", "", NNTPUserName, MAXNNTPSIZE,szAppProFile);
  3257.   GetPrivateProfileString (AUTH, "NNTPPassword", "", NNTPPasswordEncrypted, 2*MAXNNTPSIZE,szAppProFile);
  3258. d954 2
  3259. a955 2
  3260.      GetPrivateProfileInt (PREF, "EnableThreading", 0, szAppProFile);
  3261.   GetPrivateProfileString (PREF, "SignatureFile", "", SigFileName, MAXFILENAME+1,szAppProFile);
  3262. d957 1
  3263. a957 1
  3264.      GetPrivateProfileInt (PREF, "EnableSignature", 0, szAppProFile);
  3265. d960 2
  3266. a961 2
  3267.      GetPrivateProfileInt (PREF, "MailLog", 0 /* off */, szAppProFile);
  3268.   GetPrivateProfileString (PREF, "MailLogFile" , "MAIL.LOG" , MailLogFile, MAXFILENAME, szAppProFile);
  3269. d963 2
  3270. a964 2
  3271.      GetPrivateProfileInt (PREF, "PostLog", 0 /* off */, szAppProFile);
  3272.   GetPrivateProfileString (PREF, "PostLogFile" , "POST.LOG" , PostLogFile, MAXFILENAME, szAppProFile);
  3273. d967 1
  3274. a967 1
  3275.      GetPrivateProfileInt (PREF, "DoList", ID_DOLIST_ASK-ID_DOLIST_BASE,szAppProFile);
  3276. d969 1
  3277. a969 1
  3278.      GetPrivateProfileInt (PREF, "FullNameFrom", 1, szAppProFile);
  3279. d971 1
  3280. a971 1
  3281.      GetPrivateProfileInt (PREF, "ArticleThreshold", 300, szAppProFile);
  3282. d973 1
  3283. a973 1
  3284.      GetPrivateProfileInt (PREF, "MailDemandLogon", TRUE, szAppProFile);
  3285. d975 1
  3286. a975 1
  3287.      GetPrivateProfileInt (PREF, "MailForceType", -1, szAppProFile);
  3288. d977 1
  3289. a977 1
  3290.      GetPrivateProfileInt (PREF, "ShowUnsubscribed",TRUE,szAppProFile); 
  3291. d979 3
  3292. a981 1
  3293.      GetPrivateProfileInt (PREF,"ShowReadArticles",TRUE,szAppProFile);
  3294. d983 1
  3295. a983 1
  3296.      GetPrivateProfileInt (PREF, "NewWndGroup", FALSE, szAppProFile);
  3297. d985 1
  3298. a985 1
  3299.      GetPrivateProfileInt (PREF, "NewWndArticle", FALSE, szAppProFile);
  3300. d987 1
  3301. a987 1
  3302.      GetPrivateProfileInt (PREF, "SaveArtAppend", TRUE, szAppProFile);
  3303. d990 1
  3304. a990 1
  3305.      GetPrivateProfileInt (CODING, "CodingStatusVerbose", 0, szAppProFile);
  3306. d992 1
  3307. a992 1
  3308.      GetPrivateProfileInt (CODING, "DumbDecode", 0, szAppProFile);
  3309. d994 1
  3310. a994 1
  3311. //   GetPrivateProfileInt (CODING, "ReviewAttach", 1, szAppProFile);
  3312. d997 2
  3313. a998 2
  3314.      GetPrivateProfileInt (CODING, "ArticleSplitLength", 32000, szAppProFile);
  3315.   GetPrivateProfileString (CODING, "EncodingTable", "", UserCodingTable, CODINGTABLESIZE+1, szAppProFile);
  3316. d1000 1
  3317. a1000 1
  3318.   GetPrivateProfileString (CODING, "MIMEBoundary", "*-*-*- Next Section -*-*-*", MIMEBoundary, MAXINTERNALLINE, szAppProFile);
  3319. d1002 3
  3320. a1004 2
  3321.      GetPrivateProfileInt (CODING, "BlankBeforeMIME", 0, szAppProFile);
  3322.   GetPrivateProfileString (INTERFACE, "ListFontFace", "Courier", ListFontFace, 32,szAppProFile);
  3323. d1006 2
  3324. a1007 2
  3325.      GetPrivateProfileInt (INTERFACE, "ListFontSize", 10, szAppProFile);
  3326.   GetPrivateProfileString (INTERFACE, "ListFontStyle", "Regular", ListFontStyle, 32, szAppProFile);
  3327. d1010 1
  3328. a1010 1
  3329.   GetPrivateProfileString (INTERFACE, "ArticleFontFace", "Courier", ArticleFontFace, 32, szAppProFile);
  3330. d1012 3
  3331. a1014 3
  3332.      GetPrivateProfileInt (INTERFACE, "ArticleFontSize", 10,szAppProFile);
  3333.   GetPrivateProfileString (INTERFACE, "ArticleFontStyle", "Regular", ArticleFontStyle, 32, szAppProFile);
  3334.   GetPrivateProfileString (INTERFACE, "StatusFontFace", "Courier", StatusFontFace, 32, szAppProFile);
  3335. d1016 3
  3336. a1018 3
  3337.      GetPrivateProfileInt (INTERFACE, "StatusFontSize", 10,szAppProFile);
  3338.   GetPrivateProfileString (INTERFACE, "StatusFontStyle", "Regular", StatusFontStyle, 32, szAppProFile);
  3339.   GetPrivateProfileString (INTERFACE, "PrintFontFace", "Arial", PrintFontFace, 32, szAppProFile);
  3340. d1020 1
  3341. a1020 1
  3342.      GetPrivateProfileInt (INTERFACE, "PrintFontSize", 10, szAppProFile);
  3343. d1024 1
  3344. a1024 1
  3345.   GetPrivateProfileString (INTERFACE, "NetUnSubscribedColor", "0,0,200", buf, 32, szAppProFile);
  3346. d1026 1
  3347. a1026 1
  3348.   GetPrivateProfileString (INTERFACE, "NetSubscribedColor", "0,0,0", buf, 32, szAppProFile);
  3349. d1028 1
  3350. a1028 1
  3351.   GetPrivateProfileString (INTERFACE, "ArticleUnSeenColor", "0,0,0", buf, 32, szAppProFile);
  3352. d1030 1
  3353. a1030 1
  3354.   GetPrivateProfileString (INTERFACE, "ArticleSeenColor", "0,0,255", buf, 32, szAppProFile);
  3355. d1032 1
  3356. a1032 1
  3357.   GetPrivateProfileString (INTERFACE, "ArticleTextColor", "0,0,0", buf, 32, szAppProFile);
  3358. d1034 1
  3359. a1034 1
  3360.   GetPrivateProfileString (INTERFACE, "StatusTextColor", "0,0,0", buf, 32, szAppProFile);
  3361. d1036 1
  3362. a1036 1
  3363.   GetPrivateProfileString (INTERFACE, "ArticleBackgroundColor", "255,255,255", buf, 32, szAppProFile);
  3364. d1038 1
  3365. a1038 1
  3366.   GetPrivateProfileString (INTERFACE, "ListBackgroundColor", "255,255,255", buf, 32, szAppProFile);
  3367. d1040 1
  3368. a1040 1
  3369.   GetPrivateProfileString (INTERFACE, "StatusBackgroundColor", "255,255,255", buf, 32, szAppProFile);
  3370. d1043 1
  3371. a1043 1
  3372.      GetPrivateProfileInt (INTERFACE, "ThumbTrack", TRUE, szAppProFile);
  3373. d1105 1
  3374. d1155 3
  3375. a1157 3
  3376.   GetPrivateProfileString (OLD, "UserName", "", UserName, MAILLEN,szAppProFile);
  3377.   GetPrivateProfileString (OLD, "MailAddress", "", MailAddress, MAILLEN,szAppProFile);
  3378.   GetPrivateProfileString (OLD, "Organization", "", Organization, MAILLEN,szAppProFile);
  3379. d1160 3
  3380. a1162 3
  3381.      GetPrivateProfileInt (OLD, "UseSocket", 1, szAppProFile);
  3382.   GetPrivateProfileString (OLD, "NNTPHost", "news_host_here", NNTPHost, MAXNNTPSIZE,szAppProFile);
  3383.   GetPrivateProfileString (OLD, "SMTPHost", "", SMTPHost, MAXNNTPSIZE,szAppProFile);
  3384. d1164 1
  3385. a1164 1
  3386.      GetPrivateProfileInt (OLD, "NNTPPort", 119 ,szAppProFile);
  3387. d1166 1
  3388. a1166 1
  3389.      GetPrivateProfileInt (OLD, "DebugComm", FALSE, szAppProFile);
  3390. d1168 2
  3391. a1169 2
  3392.   GetPrivateProfileString (OLD, "NNTPUserName", "", NNTPUserName, MAXNNTPSIZE,szAppProFile);
  3393.   GetPrivateProfileString (OLD, "NNTPPassword", "", NNTPPasswordEncrypted, 2*MAXNNTPSIZE,szAppProFile);
  3394. d1172 2
  3395. a1173 2
  3396.      GetPrivateProfileInt (OLD, "EnableThreading", 0, szAppProFile);
  3397.   GetPrivateProfileString (OLD, "SignatureFile", "", SigFileName, MAXFILENAME+1,szAppProFile);
  3398. d1175 1
  3399. a1175 1
  3400.      GetPrivateProfileInt (OLD, "EnableSignature", 0, szAppProFile);
  3401. d1178 2
  3402. a1179 2
  3403.      GetPrivateProfileInt (OLD, "MailLog", 0 /* off */, szAppProFile);
  3404.   GetPrivateProfileString (OLD, "MailLogFile" , "MAIL.LOG" , MailLogFile, MAXFILENAME, szAppProFile);
  3405. d1181 2
  3406. a1182 2
  3407.      GetPrivateProfileInt (OLD, "PostLog", 0 /* off */, szAppProFile);
  3408.   GetPrivateProfileString (OLD, "PostLogFile" , "POST.LOG" , PostLogFile, MAXFILENAME, szAppProFile);
  3409. d1185 1
  3410. a1185 1
  3411.      GetPrivateProfileInt (OLD, "DoList", ID_DOLIST_ASK-ID_DOLIST_BASE,szAppProFile);
  3412. d1187 1
  3413. a1187 1
  3414.      GetPrivateProfileInt (OLD, "FullNameFrom", 1, szAppProFile);
  3415. d1189 1
  3416. a1189 1
  3417.      GetPrivateProfileInt (OLD, "ArticleThreshold", 300, szAppProFile);
  3418. d1191 1
  3419. a1191 1
  3420.      GetPrivateProfileInt (OLD, "MailDemandLogon", TRUE, szAppProFile);
  3421. d1193 1
  3422. a1193 1
  3423.      GetPrivateProfileInt (OLD, "MailForceType", -1, szAppProFile);
  3424. d1195 1
  3425. a1195 1
  3426.      GetPrivateProfileInt (OLD, "ShowUnsubscribed",TRUE,szAppProFile); 
  3427. d1197 3
  3428. a1199 1
  3429.      GetPrivateProfileInt (OLD,"ShowReadArticles",TRUE,szAppProFile);
  3430. d1201 1
  3431. a1201 1
  3432.      GetPrivateProfileInt (OLD, "NewWndGroup", FALSE, szAppProFile);
  3433. d1203 1
  3434. a1203 1
  3435.      GetPrivateProfileInt (OLD, "NewWndArticle", FALSE, szAppProFile);
  3436. d1205 1
  3437. a1205 1
  3438.      GetPrivateProfileInt (OLD, "SaveArtAppend", TRUE, szAppProFile);
  3439. d1208 1
  3440. a1208 1
  3441.      GetPrivateProfileInt (OLD, "CodingStatusVerbose", 0, szAppProFile);
  3442. d1210 1
  3443. a1210 1
  3444.      GetPrivateProfileInt (OLD, "DumbDecode", 0, szAppProFile);
  3445. d1212 1
  3446. a1212 1
  3447. //   GetPrivateProfileInt (OLD, "ReviewAttach", 1, szAppProFile);
  3448. d1215 2
  3449. a1216 2
  3450.      GetPrivateProfileInt (OLD, "ArticleSplitLength", 32000, szAppProFile);
  3451.   GetPrivateProfileString (OLD, "EncodingTable", "", UserCodingTable, CODINGTABLESIZE+1, szAppProFile);
  3452. d1218 1
  3453. a1218 1
  3454.   GetPrivateProfileString (OLD, "MIMEBoundary", "*-*-*- Next Section -*-*-*", MIMEBoundary, MAXINTERNALLINE, szAppProFile);
  3455. d1220 3
  3456. a1222 2
  3457.      GetPrivateProfileInt (OLD, "BlankBeforeMIME", 0, szAppProFile);
  3458.   GetPrivateProfileString (OLD, "ListFontFace", "New Courier", ListFontFace, 32,szAppProFile);
  3459. d1224 2
  3460. a1225 2
  3461.      GetPrivateProfileInt (OLD, "ListFontSize", 10, szAppProFile);
  3462.   GetPrivateProfileString (OLD, "ListFontStyle", "Regular", ListFontStyle, 32, szAppProFile);
  3463. d1228 1
  3464. a1228 1
  3465.   GetPrivateProfileString (OLD, "ArticleFontFace", "Courier", ArticleFontFace, 32, szAppProFile);
  3466. d1230 3
  3467. a1232 3
  3468.      GetPrivateProfileInt (OLD, "ArticleFontSize", 10,szAppProFile);
  3469.   GetPrivateProfileString (OLD, "ArticleFontStyle", "Regular", ArticleFontStyle, 32, szAppProFile);
  3470.   GetPrivateProfileString (OLD, "StatusFontFace", "Courier", StatusFontFace, 32, szAppProFile);
  3471. d1234 3
  3472. a1236 3
  3473.      GetPrivateProfileInt (OLD, "StatusFontSize", 10,szAppProFile);
  3474.   GetPrivateProfileString (OLD, "StatusFontStyle", "Regular", StatusFontStyle, 32, szAppProFile);
  3475.   GetPrivateProfileString (OLD, "PrintFontFace", "Arial", PrintFontFace, 32, szAppProFile);
  3476. d1238 1
  3477. a1238 1
  3478.      GetPrivateProfileInt (OLD, "PrintFontSize", 0, szAppProFile);
  3479. d1242 1
  3480. a1242 1
  3481.   GetPrivateProfileString (OLD, "NetUnSubscribedColor", "0,0,200", buf, 32, szAppProFile);
  3482. d1244 1
  3483. a1244 1
  3484.   GetPrivateProfileString (OLD, "NetSubscribedColor", "0,0,0", buf, 32, szAppProFile);
  3485. d1246 1
  3486. a1246 1
  3487.   GetPrivateProfileString (OLD, "ArticleUnSeenColor", "0,0,0", buf, 32, szAppProFile);
  3488. d1248 1
  3489. a1248 1
  3490.   GetPrivateProfileString (OLD, "ArticleSeenColor", "0,0,255", buf, 32, szAppProFile);
  3491. d1250 1
  3492. a1250 1
  3493.   GetPrivateProfileString (OLD, "ArticleTextColor", "0,0,0", buf, 32, szAppProFile);
  3494. d1252 1
  3495. a1252 1
  3496.   GetPrivateProfileString (OLD, "StatusTextColor", "0,0,0", buf, 32, szAppProFile);
  3497. d1254 1
  3498. a1254 1
  3499.   GetPrivateProfileString (OLD, "ArticleBackgroundColor", "255,255,255", buf, 32, szAppProFile);
  3500. d1256 1
  3501. a1256 1
  3502.   GetPrivateProfileString (OLD, "ListBackgroundColor", "255,255,255", buf, 32, szAppProFile);
  3503. d1258 1
  3504. a1258 1
  3505.   GetPrivateProfileString (OLD, "StatusBackgroundColor", "255,255,255", buf, 32, szAppProFile);
  3506. d1261 1
  3507. a1261 1
  3508.      GetPrivateProfileInt (OLD, "ThumbTrack", TRUE, szAppProFile);
  3509. @
  3510.  
  3511.  
  3512. 1.17
  3513. log
  3514. @mrr mods 4
  3515. @
  3516. text
  3517. @a0 1
  3518.  
  3519. d3 1
  3520. a3 1
  3521.  * $Id: winvn.c 1.16 1993/12/08 01:27:21 rushing Exp $
  3522. d5 3
  3523. d14 1
  3524. d166 2
  3525. d174 1
  3526. a174 1
  3527.       PostQuitMessage(0);
  3528. d192 1
  3529. a192 1
  3530.   InvalidateRect (hWnd, NULL, FALSE);
  3531. a194 2
  3532.  
  3533.  
  3534. a198 1
  3535.  
  3536. d222 1
  3537. a223 1
  3538.   char buf[60];
  3539. a225 1
  3540.   char intl_section[5] = "intl" ;
  3541. a227 1
  3542.   SaveNewsrc = TRUE;
  3543. a230 1
  3544.  
  3545. d238 1
  3546. a238 1
  3547.   /* Read profile strings.   */
  3548. d240 4
  3549. a243 9
  3550.   AskComm = GetPrivateProfileInt (szAppName, "AskComm", ASK_COMM_INITIAL, szAppProFile);
  3551.   UsingSocket = GetPrivateProfileInt (szAppName, "UseSocket", 1, szAppProFile);
  3552.   threadp = GetPrivateProfileInt (szAppName, "EnableThreading", 0, szAppProFile);
  3553.   GetPrivateProfileString (szAppName, "NNTPHost", "news_host_here", NNTPHost, MAXNNTPSIZE,szAppProFile);
  3554.   GetPrivateProfileString (szAppName, "SMTPHost", "", SMTPHost, MAXNNTPSIZE,szAppProFile);
  3555.   NNTPPort = GetPrivateProfileInt (szAppName, "NNTPPort", 119 ,szAppProFile);
  3556.   GetPrivateProfileString (szAppName, "CommString", "COM1:9600,e,7", szCommString, MAXCOMMCHARS,szAppProFile);
  3557.   GetPrivateProfileString (szAppName, "NNTPUserName", "", NNTPUserName, MAXNNTPSIZE,szAppProFile);
  3558.   GetPrivateProfileString (szAppName, "NNTPPassword", "", NNTPPasswordEncrypted, 2*MAXNNTPSIZE,szAppProFile);
  3559. d245 10
  3560. a254 53
  3561. #if 0
  3562.   errptr = CommStrtoID (szCommString, &CommPortID, &CommParityID, pszCommSpeed);
  3563.   if (errptr)
  3564.     {
  3565.       strcpy (mesbuf, "Error parsing ");
  3566.       strcat (mesbuf, szCommString);
  3567.       MessageBox (hWndConf, errptr, mesbuf, MB_OK | MB_ICONEXCLAMATION);
  3568.     }
  3569. #endif
  3570.   DoList =
  3571.     GetPrivateProfileInt (szAppName, "DoList", ID_DOLIST_ASK,szAppProFile);
  3572.   FullNameFrom =
  3573.     GetPrivateProfileInt (szAppName, "FullNameFrom", 1, szAppProFile);
  3574.   article_threshold =
  3575.     GetPrivateProfileInt (szAppName, "ArticleThreshold",300, szAppProFile);
  3576.  
  3577.   GetPrivateProfileString (szAppName, "UserName", "", UserName, MAILLEN,szAppProFile);
  3578.   GetPrivateProfileString (szAppName, "MailAddress", "", MailAddress, MAILLEN,szAppProFile);
  3579.   GetPrivateProfileString (szAppName, "Organization", "", Organization, MAILLEN,szAppProFile);
  3580.  
  3581.   FontSize = GetPrivateProfileInt (szAppName, "FontSize", 0, szAppProFile);
  3582.   PrintFontSize = GetPrivateProfileInt (szAppName, "PrintFontSize", 0, szAppProFile);
  3583.   GetPrivateProfileString (szAppName, "PrintFontFace", "Helv", PrintFontFace, 32,szAppProFile);
  3584.   GetPrivateProfileString (szAppName, "FontFace", "Helv", FontFace, 32,szAppProFile);
  3585.   ArticleFontSize = GetPrivateProfileInt (szAppName, "ArticleFontSize", 0,szAppProFile);
  3586.   GetPrivateProfileString (szAppName, "ArticleFontFace", "Helv", ArticleFontFace, 32, szAppProFile);
  3587.   FontBold = GetPrivateProfileInt (szAppName, "FontBold", TRUE, szAppProFile);
  3588.   ArticleFixedFont = GetPrivateProfileInt (szAppName, "ArticleFixedFont", FALSE, szAppProFile);
  3589.   GetPrivateProfileString (szAppName, "NetUnSubscribedColor", "255,33,33" /*"200,60,150"*/ , buf, 32, szAppProFile);
  3590.   NetUnSubscribedColor = StrToRGB (buf);
  3591.   GetPrivateProfileString (szAppName, "GroupSeenColor", "80,100,235" /*"100,120,180"*/ , buf, 32, szAppProFile);
  3592.   GroupSeenColor = StrToRGB (buf);
  3593.   ViewNew = GetPrivateProfileInt (szAppName, "NewWndGroup", FALSE, szAppProFile);
  3594.   NewArticleWindow = GetPrivateProfileInt (szAppName, "NewWndArticle", FALSE, szAppProFile);
  3595.   SaveArtAppend = GetPrivateProfileInt (szAppName, "SaveArtAppend", TRUE, szAppProFile);
  3596.   ThumbTrack = GetPrivateProfileInt (szAppName, "ThumbTrack", TRUE, szAppProFile);
  3597.   MailDemandLogon = GetPrivateProfileInt (szAppName, "MailDemandLogon", TRUE, szAppProFile);
  3598.   MailForceType = GetPrivateProfileInt (szAppName, "MailForceType", -1, szAppProFile);
  3599.  
  3600.   MailLog = GetPrivateProfileInt (szAppName, "MailLog", 0 /* off */, szAppProFile);
  3601.   GetPrivateProfileString (szAppName, "MailLogFile" , "MAIL.LOG" , MailLogFile, MAXFILENAME, szAppProFile);
  3602.   PostLog = GetPrivateProfileInt (szAppName, "PostLog", 0 /* off */, szAppProFile);
  3603.   GetPrivateProfileString (szAppName, "PostLogFile" , "POST.LOG" , PostLogFile, MAXFILENAME, szAppProFile);
  3604.   ShowUnsubscribed = GetPrivateProfileInt (szAppName,"ShowUnsubscribed",TRUE,szAppProFile); 
  3605.   ShowReadArticles = GetPrivateProfileInt (szAppName,"ShowReadArticles",TRUE,szAppProFile);
  3606.   DebugComm = GetPrivateProfileInt (szAppName, "DebugComm", FALSE, szAppProFile);
  3607.  
  3608.   /* internationalise winvn */
  3609.  
  3610.   GetProfileString (intl_section , "sDate", "." ,fmtDateDelim ,2 );
  3611. //  fmtDateDelim[1]=0 ;
  3612.   fmtDaysB4Mth = (1 == GetProfileInt (intl_section,"iDate", 0 /* US Date Format*/));
  3613.  
  3614. d271 5
  3615. d282 3
  3616. d353 28
  3617. a380 1
  3618.     }                                  
  3619. a396 1
  3620.  *    In particular, I do a bunch of font stuff here.
  3621. a397 1
  3622.  
  3623. d401 1
  3624. a401 2
  3625.   int retcode, j;
  3626.   TEXTMETRIC tmFontInfo;
  3627. d403 1
  3628. a403 1
  3629.   HDC hDC;
  3630. d405 1
  3631. a405 2
  3632.   retcode = TRUE;
  3633.   CheckView (hWndConf);    /* modify menu as necessary           */
  3634. d407 2
  3635. a408 4
  3636.   hDC = GetDC (hWndConf);
  3637.   /* Unless user specified the system font, create a font as per
  3638.    * the user's specifications.
  3639.    */
  3640. d410 6
  3641. a415 21
  3642.   if (FontSize)
  3643.    {
  3644.       hFont = CreateFont (FontSize,
  3645.       0, /* width */
  3646.       0, /* escapement */
  3647.       0, /* orientation */
  3648.       FontBold ? FW_BOLD : FW_MEDIUM,
  3649.       0, /* no italics */
  3650.       0, /* no underline */
  3651.       0, /* no strikeout */
  3652.       0,
  3653.       OUT_DEFAULT_PRECIS,
  3654.       CLIP_DEFAULT_PRECIS,
  3655.       0, /* no PROOF_QUALITY */
  3656.       0,
  3657.       FontFace);
  3658.    }
  3659.    else
  3660.    {
  3661.       hFont = GetStockObject (OEM_FIXED_FONT);
  3662.    }
  3663. d417 2
  3664. a418 41
  3665.   if (ArticleFontSize && !ArticleFixedFont)
  3666.    {
  3667.       hFontArtNormal = CreateFont (ArticleFontSize,
  3668.       0, /* width */
  3669.       0, /* escapement */
  3670.       0, /* orientation */
  3671.       FW_MEDIUM,    /* default weight */
  3672.       0, /* no italics */
  3673.       0, /* no underline */
  3674.       0, /* no strikeout */
  3675.       0,
  3676.       OUT_DEFAULT_PRECIS,
  3677.       CLIP_DEFAULT_PRECIS,
  3678.       0, /* no PROOF_QUALITY */
  3679.       0,
  3680.       ArticleFontFace);
  3681.      hFontArtQuote = CreateFont (ArticleFontSize,
  3682.       0, /* width */
  3683.       0, /* escapement */
  3684.       0, /* orientation */
  3685.       FW_MEDIUM,    /* default weight */
  3686.       1, /* comments are in italics */
  3687.       0, /* no underline */
  3688.       0, /* no strikeout */
  3689.       0,
  3690.       OUT_DEFAULT_PRECIS,
  3691.       CLIP_DEFAULT_PRECIS,
  3692.       0, /* no PROOF_QUALITY */
  3693.       0,
  3694.       ArticleFontFace);
  3695.    }
  3696.    else if (ArticleFixedFont)
  3697.    {
  3698.       hFontArtNormal  = GetStockObject (ANSI_FIXED_FONT);
  3699.       hFontArtQuote = GetStockObject (ANSI_FIXED_FONT);
  3700.    }
  3701.    else
  3702.    {
  3703.       hFontArtNormal = hFont;
  3704.       hFontArtQuote = hFont;
  3705.    }
  3706. d420 3
  3707. a422 16
  3708.   if (PrintFontSize)
  3709.    {
  3710.      hFontPrint = CreateFont (PrintFontSize,
  3711.                                0,     /* width */
  3712.                                0,   /* escapement */
  3713.                                0,   /* orientation */
  3714.                                FW_MEDIUM,
  3715.                                0,   /* no italics */
  3716.                                0,   /* no underline */
  3717.                                0,   /* no strikeout */
  3718.                                     0,
  3719.                                OUT_DEFAULT_PRECIS,
  3720.                                CLIP_DEFAULT_PRECIS,
  3721.                                0,   /* no PROOF_QUALITY */
  3722.                                0,
  3723.                                PrintFontFace);
  3724. d424 2
  3725. a425 14
  3726.      hFontPrintB = CreateFont (PrintFontSize,
  3727.                                0,     /* width */
  3728.                                0,   /* escapement */
  3729.                                0,   /* orientation */
  3730.                                FW_BOLD,
  3731.                                0,   /* no italics */
  3732.                                0,   /* no underline */
  3733.                                0,   /* no strikeout */
  3734.                                     0,
  3735.                                OUT_DEFAULT_PRECIS,
  3736.                                CLIP_DEFAULT_PRECIS,
  3737.                                0,   /* no PROOF_QUALITY */
  3738.                                0,
  3739.                                PrintFontFace);
  3740. d427 12
  3741. a438 14
  3742.            hFontPrintI = CreateFont ((int)(PrintFontSize * .90),
  3743.                                0,     /* width */
  3744.                                0,   /* escapement */
  3745.                                0,   /* orientation */
  3746.                                FW_LIGHT,
  3747.                                1,   /* italics */
  3748.                                0,   /* no underline */
  3749.                                0,   /* no strikeout */
  3750.                                     0,
  3751.                                OUT_DEFAULT_PRECIS,
  3752.                                CLIP_DEFAULT_PRECIS,
  3753.                                0,   /* no PROOF_QUALITY */
  3754.                                0,
  3755.                                PrintFontFace);
  3756. d440 2
  3757. a441 31
  3758.            hFontPrintS = CreateFont ((int)(PrintFontSize * 1.5),
  3759.                                0,     /* width */
  3760.                                0,   /* escapement */
  3761.                                0,   /* orientation */
  3762.                                FW_EXTRABOLD,
  3763.                                0,   /* no italics */
  3764.                                1,   /* underline */
  3765.                                0,   /* no strikeout */
  3766.                                     0,
  3767.                                OUT_DEFAULT_PRECIS,
  3768.                                CLIP_DEFAULT_PRECIS,
  3769.                                0,   /* no PROOF_QUALITY */
  3770.                                0,
  3771.                                "Helv");
  3772.    }
  3773.    else
  3774.    {
  3775.                 hFontPrint = CreateFont (40,    /* default Font Size */
  3776.                                0,     /* width */
  3777.                                0,   /* escapement */
  3778.                                0,   /* orientation */
  3779.                                FW_MEDIUM,
  3780.                                0,   /* no italics */
  3781.                                0,   /* no underline */
  3782.                                0,   /* no strikeout */
  3783.                                     0,
  3784.                                OUT_DEFAULT_PRECIS,
  3785.                                CLIP_DEFAULT_PRECIS,
  3786.                                0,   /* no PROOF_QUALITY */
  3787.                                0,
  3788.                                0);    /* Default Font Face */
  3789. a442 14
  3790.       hFontPrintB = CreateFont (40,   /* default font size */
  3791.                                0,     /* width */
  3792.                                0,   /* escapement */
  3793.                                0,   /* orientation */
  3794.                                FW_BOLD,
  3795.                                0,   /* no italics */
  3796.                                0,   /* no underline */
  3797.                                0,   /* no strikeout */
  3798.                                     0,
  3799.                                OUT_DEFAULT_PRECIS,
  3800.                                CLIP_DEFAULT_PRECIS,
  3801.                                0,   /* no PROOF_QUALITY */
  3802.                                0,
  3803.                                0);    /* default font face */
  3804. d444 11
  3805. a454 14
  3806.               hFontPrintI = CreateFont (36,   /* default font size */
  3807.                                0,     /* width */
  3808.                                0,   /* escapement */
  3809.                                0,   /* orientation */
  3810.                                FW_LIGHT,
  3811.                                1,   /* italics */
  3812.                                0,   /* no underline */
  3813.                                0,   /* no strikeout */
  3814.                                     0,
  3815.                                OUT_DEFAULT_PRECIS,
  3816.                                CLIP_DEFAULT_PRECIS,
  3817.                                0,   /* no PROOF_QUALITY */
  3818.                                0,
  3819.                                0);    /* default font face */
  3820. d456 3
  3821. a458 15
  3822.               hFontPrintS = CreateFont (60,
  3823.                                0,     /* width */
  3824.                                0,   /* escapement */
  3825.                                0,   /* orientation */
  3826.                                FW_EXTRABOLD,
  3827.                                0,   /* no italics */
  3828.                                1,   /* underline */
  3829.                                0,   /* no strikeout */
  3830.                                     0,
  3831.                                OUT_DEFAULT_PRECIS,
  3832.                                CLIP_DEFAULT_PRECIS,
  3833.                                0,   /* no PROOF_QUALITY */
  3834.                                0,
  3835.                                "Helv");
  3836.    }
  3837. d460 2
  3838. a461 1
  3839.   ReleaseDC (hWndConf, hDC);
  3840. d463 21
  3841. d491 1
  3842. a491 1
  3843.   SelectObject (hDC, hFont);
  3844. d501 1
  3845. d503 56
  3846. d562 1
  3847. a562 1
  3848.  
  3849. d566 1
  3850. d568 5
  3851. a572 1
  3852.   strcpy (SaveArtFileName, "");
  3853. d574 3
  3854. a576 1
  3855.   /* Initialize some document-related stuff.                        */
  3856. d578 2
  3857. a579 7
  3858.   ActiveGroupDoc = (TypDoc *) NULL;
  3859.   ActiveArticleDoc = (TypDoc *) NULL;
  3860.   for (j = 0; j < MAXGROUPWNDS; j++)
  3861.     GroupDocs[j].InUse = FALSE;
  3862.   for (j = 0; j < MAXARTICLEWNDS; j++)
  3863.     ArticleDocs[j].InUse = FALSE;
  3864.   savingArtIndex = -1;     /* reset to non-saving state */
  3865. d581 34
  3866. a614 1
  3867.   return retcode;
  3868. d617 27
  3869. d645 15
  3870. d661 100
  3871. d884 4
  3872. a887 4
  3873.    {
  3874.      TranslateMessage (&MainMsg);
  3875.      DispatchMessage (&MainMsg);
  3876.    }
  3877. d891 357
  3878. @
  3879.  
  3880.  
  3881. 1.16
  3882. log
  3883. @new version box and cr lf consistency
  3884. @
  3885. text
  3886. @d4 1
  3887. a4 1
  3888.  * $Id: winvn.c 1.15 1993/08/25 18:55:19 mbretherton Exp rushing $
  3889. d6 3
  3890. d131 1
  3891. a131 1
  3892.   /* just has an initialization message in it.                              */
  3893. d140 2
  3894. a141 2
  3895.     * info instead.
  3896.     */
  3897. d143 1
  3898. a143 1
  3899.      mybuf,MAXINTERNALLINE,szAppProFile);
  3900. d145 1
  3901. a145 1
  3902.      sscanf(mybuf,"%d,%d,%d,%d",&x,&y,&width,&height);
  3903. d149 10
  3904. a158 10
  3905.                "WinVN -- Usenet News Reader",
  3906.                WS_OVERLAPPEDWINDOW | WS_VSCROLL,
  3907.                  x,    /* Initial X position */
  3908.                  y,    /* Initial Y position */
  3909.                  width,    /* Initial X width */
  3910.                  height,/* Initial Y height */
  3911.                NULL,
  3912.                NULL,
  3913.                hInstance,
  3914.                NULL);
  3915. d164 1
  3916. a164 1
  3917.   NetDoc.hDocWnd = hWnd;    /* mrr */
  3918. d229 1
  3919. a229 1
  3920.   LineHeight = 30;        /* kludge so Net window doesn't get divide-by-zero */
  3921. d294 3
  3922. d394 1
  3923. a394 2
  3924.     }
  3925.  
  3926. d423 1
  3927. a423 1
  3928.   CheckView (hWndConf);        /* modify menu as necessary           */
  3929. d431 20
  3930. a450 20
  3931.     {
  3932.         hFont = CreateFont (FontSize,
  3933.         0,    /* width */
  3934.         0,    /* escapement */
  3935.         0,    /* orientation */
  3936.         FontBold ? FW_BOLD : FW_MEDIUM,
  3937.         0,    /* no italics */
  3938.         0,    /* no underline */
  3939.         0,    /* no strikeout */
  3940.         0,
  3941.         OUT_DEFAULT_PRECIS,
  3942.         CLIP_DEFAULT_PRECIS,
  3943.         0,    /* no PROOF_QUALITY */
  3944.         0,
  3945.         FontFace);
  3946.     }
  3947.     else
  3948.     {
  3949.         hFont = GetStockObject (OEM_FIXED_FONT);
  3950.     }
  3951. d453 40
  3952. a492 40
  3953.     {
  3954.         hFontArtNormal = CreateFont (ArticleFontSize,
  3955.         0,    /* width */
  3956.         0,    /* escapement */
  3957.         0,    /* orientation */
  3958.         FW_MEDIUM,    /* default weight */
  3959.         0,    /* no italics */
  3960.         0,    /* no underline */
  3961.         0,    /* no strikeout */
  3962.         0,
  3963.         OUT_DEFAULT_PRECIS,
  3964.         CLIP_DEFAULT_PRECIS,
  3965.         0,    /* no PROOF_QUALITY */
  3966.         0,
  3967.         ArticleFontFace);
  3968.       hFontArtQuote = CreateFont (ArticleFontSize,
  3969.         0,    /* width */
  3970.         0,    /* escapement */
  3971.         0,    /* orientation */
  3972.         FW_MEDIUM,    /* default weight */
  3973.         1,    /* comments are in italics */
  3974.         0,    /* no underline */
  3975.         0,    /* no strikeout */
  3976.         0,
  3977.         OUT_DEFAULT_PRECIS,
  3978.         CLIP_DEFAULT_PRECIS,
  3979.         0,    /* no PROOF_QUALITY */
  3980.         0,
  3981.         ArticleFontFace);
  3982.     }
  3983.     else if (ArticleFixedFont)
  3984.     {
  3985.         hFontArtNormal  = GetStockObject (ANSI_FIXED_FONT);
  3986.         hFontArtQuote = GetStockObject (ANSI_FIXED_FONT);
  3987.     }
  3988.     else
  3989.     {
  3990.         hFontArtNormal = hFont;
  3991.         hFontArtQuote = hFont;
  3992.     }
  3993. d495 30
  3994. a524 30
  3995.     {
  3996.       hFontPrint = CreateFont (PrintFontSize,
  3997.                                  0,     /* width */
  3998.                                  0,    /* escapement */
  3999.                                  0,    /* orientation */
  4000.                                  FW_MEDIUM,
  4001.                                  0,    /* no italics */
  4002.                                  0,    /* no underline */
  4003.                                  0,    /* no strikeout */
  4004.                                      0,
  4005.                                  OUT_DEFAULT_PRECIS,
  4006.                                  CLIP_DEFAULT_PRECIS,
  4007.                                  0,    /* no PROOF_QUALITY */
  4008.                                  0,
  4009.                                  PrintFontFace);
  4010.  
  4011.       hFontPrintB = CreateFont (PrintFontSize,
  4012.                                  0,     /* width */
  4013.                                  0,    /* escapement */
  4014.                                  0,    /* orientation */
  4015.                                  FW_BOLD,
  4016.                                  0,    /* no italics */
  4017.                                  0,    /* no underline */
  4018.                                  0,    /* no strikeout */
  4019.                                      0,
  4020.                                  OUT_DEFAULT_PRECIS,
  4021.                                  CLIP_DEFAULT_PRECIS,
  4022.                                  0,    /* no PROOF_QUALITY */
  4023.                                  0,
  4024.                                  PrintFontFace);
  4025. d527 13
  4026. a539 13
  4027.                                  0,     /* width */
  4028.                                  0,    /* escapement */
  4029.                                  0,    /* orientation */
  4030.                                  FW_LIGHT,
  4031.                                  1,    /* italics */
  4032.                                  0,    /* no underline */
  4033.                                  0,    /* no strikeout */
  4034.                                      0,
  4035.                                  OUT_DEFAULT_PRECIS,
  4036.                                  CLIP_DEFAULT_PRECIS,
  4037.                                  0,    /* no PROOF_QUALITY */
  4038.                                  0,
  4039.                                  PrintFontFace);
  4040. d542 16
  4041. a557 16
  4042.                                  0,     /* width */
  4043.                                  0,    /* escapement */
  4044.                                  0,    /* orientation */
  4045.                                  FW_EXTRABOLD,
  4046.                                  0,    /* no italics */
  4047.                                  1,    /* underline */
  4048.                                  0,    /* no strikeout */
  4049.                                      0,
  4050.                                  OUT_DEFAULT_PRECIS,
  4051.                                  CLIP_DEFAULT_PRECIS,
  4052.                                  0,    /* no PROOF_QUALITY */
  4053.                                  0,
  4054.                                  "Helv");
  4055.     }
  4056.     else
  4057.     {
  4058. d559 28
  4059. a586 28
  4060.                                  0,     /* width */
  4061.                                  0,    /* escapement */
  4062.                                  0,    /* orientation */
  4063.                                  FW_MEDIUM,
  4064.                                  0,    /* no italics */
  4065.                                  0,    /* no underline */
  4066.                                  0,    /* no strikeout */
  4067.                                      0,
  4068.                                  OUT_DEFAULT_PRECIS,
  4069.                                  CLIP_DEFAULT_PRECIS,
  4070.                                  0,    /* no PROOF_QUALITY */
  4071.                                  0,
  4072.                                  0);    /* Default Font Face */
  4073.  
  4074.         hFontPrintB = CreateFont (40,   /* default font size */
  4075.                                  0,     /* width */
  4076.                                  0,    /* escapement */
  4077.                                  0,    /* orientation */
  4078.                                  FW_BOLD,
  4079.                                  0,    /* no italics */
  4080.                                  0,    /* no underline */
  4081.                                  0,    /* no strikeout */
  4082.                                      0,
  4083.                                  OUT_DEFAULT_PRECIS,
  4084.                                  CLIP_DEFAULT_PRECIS,
  4085.                                  0,    /* no PROOF_QUALITY */
  4086.                                  0,
  4087.                                  0);    /* default font face */
  4088. d589 13
  4089. a601 13
  4090.                                  0,     /* width */
  4091.                                  0,    /* escapement */
  4092.                                  0,    /* orientation */
  4093.                                  FW_LIGHT,
  4094.                                  1,    /* italics */
  4095.                                  0,    /* no underline */
  4096.                                  0,    /* no strikeout */
  4097.                                      0,
  4098.                                  OUT_DEFAULT_PRECIS,
  4099.                                  CLIP_DEFAULT_PRECIS,
  4100.                                  0,    /* no PROOF_QUALITY */
  4101.                                  0,
  4102.                                  0);    /* default font face */
  4103. d604 14
  4104. a617 14
  4105.                                  0,     /* width */
  4106.                                  0,    /* escapement */
  4107.                                  0,    /* orientation */
  4108.                                  FW_EXTRABOLD,
  4109.                                  0,    /* no italics */
  4110.                                  1,    /* underline */
  4111.                                  0,    /* no strikeout */
  4112.                                      0,
  4113.                                  OUT_DEFAULT_PRECIS,
  4114.                                  CLIP_DEFAULT_PRECIS,
  4115.                                  0,    /* no PROOF_QUALITY */
  4116.                                  0,
  4117.                                  "Helv");
  4118.     }
  4119. d657 1
  4120. a657 1
  4121.   savingArtIndex = -1;        /* reset to non-saving state */
  4122. d787 4
  4123. a790 4
  4124.     {
  4125.       TranslateMessage (&MainMsg);
  4126.       DispatchMessage (&MainMsg);
  4127.     }
  4128. @
  4129.  
  4130.  
  4131.  
  4132. 1.15
  4133. log
  4134. @MRB merge, mail & post logging
  4135. @
  4136. text
  4137. @d1 1
  4138. d4 1
  4139. a4 1
  4140.  * $Id: winvn.c 1.14 1993/08/05 20:06:07 jcoop Exp $
  4141. d6 2
  4142. @
  4143.  
  4144.  
  4145.  
  4146. 1.14
  4147. log
  4148. @save multiple articles changes by jcoop@@oakb2s01.apl.com (John S Cooper)
  4149. @
  4150. text
  4151. @d3 1
  4152. a3 1
  4153.  * $Id: winvn.c 1.13 1993/07/13 16:03:04 riordan Exp $
  4154. d5 7
  4155. a33 1
  4156.  *
  4157. d281 1
  4158. a281 1
  4159.   MailDemandLogon = GetPrivateProfileInt (szAppName, "MailDemandLogon", FALSE, szAppProFile);
  4160. d284 5
  4161. d310 1
  4162. @
  4163.  
  4164.  
  4165.  
  4166. 1.13
  4167. log
  4168. @MRR mods
  4169. @
  4170. text
  4171. @d3 1
  4172. a3 1
  4173.  * $Id: winvn.c 1.12 1993/07/06 21:09:09 cnolan Exp $
  4174. d5 3
  4175. d289 1
  4176. d637 1
  4177. @
  4178.  
  4179.  
  4180.  
  4181. 1.12
  4182. log
  4183. @win32 support
  4184. @
  4185. text
  4186. @d3 1
  4187. a3 1
  4188.  * $Id: winvn.c 1.11 1993/06/25 20:14:09 dumoulin Exp $
  4189. d5 3
  4190. d233 3
  4191. @
  4192.  
  4193.  
  4194.  
  4195. 1.11
  4196. log
  4197. @Cleaned up Compiler Warnings
  4198. @
  4199. text
  4200. @d3 1
  4201. a3 1
  4202.  * $Id: winvn.c 1.10 1993/06/24 17:13:14 riordan Exp dumoulin $
  4203. d5 3
  4204. d654 1
  4205. a654 1
  4206.       SetCommState ((DCB FAR *) & DCBComm);
  4207. @
  4208.  
  4209.  
  4210.  
  4211. 1.10
  4212. log
  4213. @Save window positions between sessions.
  4214. @
  4215. text
  4216. @d3 1
  4217. a3 1
  4218.  * $Id: winvn.c 1.9 1993/06/11 00:12:13 rushing Exp $
  4219. d5 3
  4220. d123 1
  4221. a123 1
  4222.   if(mybuf != '!') {
  4223. d199 1
  4224. a199 1
  4225.   char mesbuf[60];
  4226. d201 1
  4227. a201 1
  4228.   char *errptr;
  4229. @
  4230.  
  4231.  
  4232.  
  4233. 1.9
  4234. log
  4235. @second merge from Matt Bretherton sources.
  4236. @
  4237. text
  4238. @d3 1
  4239. a3 1
  4240.  * $Id: winvn.c 1.8 1993/05/28 17:18:00 rushing Exp $
  4241. d5 2
  4242. d8 1
  4243. a47 5
  4244.  *  WINVN currently only reads articles; it does not allow posting
  4245.  *  or mailing.  Posting will be implemented when I get around to it;
  4246.  *  the delay is due to the need to first implement an authentication
  4247.  *  scheme so we know the poster is accurately identified.
  4248.  *
  4249. d52 1
  4250. d91 3
  4251. d107 1
  4252. a107 1
  4253.   /* just has an initialization message in it.                      */
  4254. d109 15
  4255. d127 4
  4256. a130 4
  4257.                0,    /* Initial X position */
  4258.                0,    /* Initial Y position */
  4259.                (int) (xScreen * 1 / 2),    /* Initial X width */
  4260.                (int) (yScreen * 9 / 10),/* Initial Y height */
  4261. a756 1
  4262.  
  4263. @
  4264.  
  4265.  
  4266.  
  4267. 1.8
  4268. log
  4269. @Added Misc... option to enable threading
  4270. @
  4271. text
  4272. @d3 1
  4273. a3 1
  4274.  * $Id: winvn.c 1.7 1993/05/24 23:27:38 rushing Exp rushing $
  4275. d5 4
  4276. d183 1
  4277. d243 8
  4278. d264 1
  4279. @
  4280.  
  4281.  
  4282.  
  4283. 1.7
  4284. log
  4285. @Create an Article Italics Font for Quotation lines (MRB)
  4286. @
  4287. text
  4288. @d3 1
  4289. a3 1
  4290.  * $Id: winvn.c 1.6 1993/05/18 22:10:45 rushing Exp $
  4291. d5 2
  4292. d8 1
  4293. d197 1
  4294. @
  4295.  
  4296.  
  4297.  
  4298. 1.6
  4299. log
  4300. @smtp support
  4301. @
  4302. text
  4303. @d3 1
  4304. a3 1
  4305.  * $Id: winvn.c 1.5 1993/05/13 19:58:35 rushing Exp rushing $
  4306. d5 4
  4307. d383 1
  4308. a383 1
  4309.         hFontArt = CreateFont (ArticleFontSize,
  4310. d397 14
  4311. d414 2
  4312. a415 1
  4313.         hFontArt = GetStockObject (ANSI_FIXED_FONT);
  4314. d419 2
  4315. a420 1
  4316.         hFontArt = hFont;
  4317. d569 1
  4318. a569 1
  4319.   SelectObject (hDC, hFontArt);
  4320. @
  4321.  
  4322.  
  4323.  
  4324. 1.5
  4325. log
  4326. @fancy 'from' in group window
  4327. @
  4328. text
  4329. @d3 1
  4330. a3 1
  4331.  * $Id: winvn.c 1.4 1993/05/13 16:18:00 rushing Exp rushing $
  4332. d5 3
  4333. d190 2
  4334. a191 1
  4335.   GetPrivateProfileString (szAppName, "NNTPHost", "titan", NNTPHost, MAXNNTPSIZE,szAppProFile);
  4336. d237 1
  4337. a237 1
  4338.   lpfnWinVnSubjectDlg = MakeProcInstance (WinVnSubjectDlg, hInstance);
  4339. @
  4340.  
  4341.  
  4342.  
  4343. 1.4
  4344. log
  4345. @article fetch limit (ArticleThreshold .ini param) support.
  4346. @
  4347. text
  4348. @d3 1
  4349. a3 1
  4350.  * $Id: winvn.c 1.3 1993/04/29 20:25:23 rushing Exp rushing $
  4351. d5 3
  4352. d199 4
  4353. a202 1
  4354.   DoList = GetPrivateProfileInt (szAppName, "DoList", ID_DOLIST_ASK,szAppProFile);
  4355. @
  4356.  
  4357.  
  4358.  
  4359. 1.3
  4360. log
  4361. @attempted support for WSAAsyncSelect
  4362. @
  4363. text
  4364. @d3 1
  4365. a3 1
  4366.  * $Id: winvn.c 1.2 1993/03/09 01:28:03 dumoulin Exp rushing $
  4367. d5 3
  4368. d187 1
  4369. d195 1
  4370. a195 1
  4371.  
  4372. d197 2
  4373. d233 1
  4374. @
  4375.  
  4376.  
  4377.  
  4378. 1.2
  4379. log
  4380. @added support for italic fonts in printing articles
  4381. @
  4382. text
  4383. @d3 5
  4384. a7 2
  4385.  * $Id: winvn.c%v 1.1 1993/02/16 20:53:50 rushing Exp rushing $
  4386.  * $Log: winvn.c%v $
  4387. a78 5
  4388.   /* Set up communications--serial or IP.                           */
  4389.  
  4390.   if (MRRInitComm ())
  4391.       PostQuitMessage(0);
  4392.  
  4393. d104 5
  4394. @
  4395.  
  4396.  
  4397.  
  4398. 1.1
  4399. log
  4400. @Initial revision
  4401. @
  4402. text
  4403. @d3 4
  4404. a6 2
  4405.  * $Id$
  4406.  * $Log$
  4407. d8 1
  4408. d327 1
  4409. d415 15
  4410. d468 15
  4411. @
  4412.  
  4413.